#24 PKCS#11 problem

v1.1.9
open
nobody
None
5
2011-06-30
2011-06-30
No

I have eToken PRO 32K. I configured JSignPdf and I tried to sign pdf with my key on eToken.
I selected Keystore type: PKCS11
I pressed "Load Keys" then in field Key alias threee keys was showed. I selected one of them.
Of course I put input and output pdf files, then I pressed "Sign It".

Here is log file:

Starting PDF Signer
Checking input and output PDF paths.
Used key alias: XXX YYYY/1.2.840.113549.1.9.1=#1612737570706f7274406361636572742e6f7267,cn=ca cert signing authority,ou=http://www.cacert.org,o=root ca/682313
Loading private key
Getting certificate chain
Opening input PDF file: /Users/bmalkow/Documents/Dokumenty.pdf
Creating output PDF file: /Users/bmalkow/Desktop/X.pdf
Creating signature
Setting certification level
Processing (it may take a while) ...
Problem occured
java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_FAILED
at sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:531)
at java.security.Signature$Delegate.engineSign(Signature.java:1128)
at java.security.Signature.sign(Signature.java:522)
at com.lowagie.text.pdf.PdfPKCS7.getEncodedPKCS7(Unknown Source)
at net.sf.jsignpdf.SignerLogic.run(SignerLogic.java:267)
at java.lang.Thread.run(Thread.java:680)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_FAILED
at sun.security.pkcs11.wrapper.PKCS11.C_Sign(Native Method)
at sun.security.pkcs11.P11Signature.engineSign(P11Signature.java:522)
... 5 more
Finished: Creating of signature failed.

Do you know how to fix it?

Discussion

  • Josef Cacek
    Josef Cacek
    2011-11-29

    Could you try the latest application version please?