Digital signature with iText and beID (using 2048 RSA key) on JDK8

862 Views Asked by At

When used under JKD8, the signature of PDF files using iText and beID (with RSA key 2048 bits) will throws an exception: RSA key must be at most 1024 bits

26/09/2014 10:48:36 [exitApplication] [SEVERE] - exitApplication with status 1  
    java.security.InvalidKeyException: RSA key must be at most 1024 bits  
    at sun.security.pkcs11.P11Signature.checkKeySize(P11Signature.java:363) at sun...  
    at sun.security.pkcs11.P11Signature.engineInitSign(P11Signature.java::427)

    at java.security.Signature$Delegate.engineInitSign (Signature.java:1129)  
    at java.security.Signature.initSign (Signature;java:512)  
    at com.itextpdf.pdf.security.PrivateKeySignature.sign(PrivateKeySignature.java:115)

    at com.itextpdf.pdf.security.MakeSignature.signDetached(MakeSignature.java:152)
1

There are 1 best solutions below

1
Ju Vro On

Use an updated version of the middleware that fixes this bug:

Reported Issue

This issue should be fixed in the future release build (v410), which you can find on http://eid.belgium.be/en/using_your_eid/installing_the_eid_software/windows/