sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_FAILED
Hi Folks,
we are having an issue with SUN Security in JDK 10 (same in 8). The exception is:
Caused by: java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_FAILED
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:620)
at java.base/java.security.Signature$Delegate.engineSign(Signature.java:1233)
at java.base/java.security.Signature.sign(Signature.java:597)
This happens when we use a Certificate on a SmartCard (USB reader) to digital sign documents.
Searching for the error seems that it is generated by a known bug (JDK-8074580) in some
JDK versions/updates but we are unable to find the version/update that fix it.