Проблема с использованием рутокен под Linux (Debian9)
Добрый день. Установил рутокен на устройство с АРМ архитектурой (для запуска ЕГАИС), использовал статью с хабры https://habr.com/ru/post/550992/ УТМ запустился и видит ключ, но не может подписать документы.
Ошибка в логе:
2021-04-13 16:04:40,553 ERROR ru.centerinform.transport.crypto.CryptographerWrapper - Ошибка подписи документа
java.lang.IllegalStateException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_MECHANISM_INVALID
at ru.centerinform.transport.crypto.p.a(SunSignerRutoken.java:86)
at ru.centerinform.transport.crypto.q.a(SunStreamSigner.java:112)
at ru.centerinform.transport.crypto.q.b(SunStreamSigner.java:69)
at ru.centerinform.transport.crypto.q.a(SunStreamSigner.java:62)
at ru.centerinform.transport.crypto.SunCryptographer.a(SunCryptographer.java:531)
at ru.centerinform.transport.crypto.SunCryptographer.b(SunCryptographer.java:513)
at ru.centerinform.transport.crypto.SunCryptographer.a(SunCryptographer.java:214)
at ru.centerinform.transport.crypto.CryptographerWrapper.a(CryptographerWrapper.java:51)
at ru.centerinform.transport.validate.license.LicenseSupervision.e(LicenseSupervision.java:2035)
at ru.centerinform.transport.backbone.schedule.RequestLicenseJob.a(RequestLicenseJob.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_MECHANISM_INVALID
at sun.security.pkcs11.wrapper.PKCS11.C_DigestSingle(Native Method)
at sun.security.pkcs11.wrapper.PKCS11$SynchronizedPKCS11.C_DigestSingle(PKCS11.java:1784)
at ru.centerinform.transport.crypto.p.a(SunSignerRutoken.java:80)
... 22 common frames omitted