Using jsignodf on iseries/AS400

62 views
Skip to first unread message

play play

unread,
Aug 12, 2018, 3:53:56 PM8/12/18
to JSignPdf
Hi All,

Anyone have used jsignpdf on iseries/AS400 to sign PDF documents? I am trying to use below command but it fails with below error - appreciate any help !!!

java -jar JSignPdf.jar -kst PKCS12 -ksf /home/user1/JSignPdf-1.6.3/xx.pfx -ksp xxxxxx  invoice_1.pdf  

error:  

java -jar JSignPdf.jar -kst PKCS12 -ksf /home/user1/JSignPdf-1.6.3/xx.pfx -ksp xxxxxx invoice_1.pdf  -v                
WARN  net.sf.jsignpdf.utils.PropertyProvider$ProperyProviderException: Property file /home/user1/.JSignPdf doesn't exist.
DEBUG Relaxing SSL security.                                                                                           
JSignPdf version 1.6.3                                                                                                 
INFO  Checking input and output PDF paths.                                                                             
java.io.IOException: Error in loading the keystore: short read of DER BMPString                                        
        at com.ibm.crypto.provider.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:291)                                        
        at java.security.KeyStore.load(KeyStore.java:1238)                                                                   
        at net.sf.jsignpdf.utils.KeyStoreUtils.loadKeyStore(KeyStoreUtils.java:352)                                          
        at net.sf.jsignpdf.utils.KeyStoreUtils.getPkInfo(KeyStoreUtils.java:406)                                             
        at net.sf.jsignpdf.SignerLogic.signFile(SignerLogic.java:135)                                                        
        at net.sf.jsignpdf.Signer.signFiles(Signer.java:242)                                                                 
        at net.sf.jsignpdf.Signer.main(Signer.java:137)                                                                      
WARN  Keystore was not loaded succesfully. Check if the keystore type, path and password are valid.                          
ERROR Problem occured                                                                                                        
java.lang.NullPointerException: Keystore was not loaded succesfully. Check if the keystore type, path and password are valid.
        at net.sf.jsignpdf.utils.KeyStoreUtils.getKeyAliasInternal(KeyStoreUtils.java:216)                                   
        at net.sf.jsignpdf.utils.KeyStoreUtils.getPkInfo(KeyStoreUtils.java:408)                                             
        at net.sf.jsignpdf.SignerLogic.signFile(SignerLogic.java:135)                                                        
        at net.sf.jsignpdf.Signer.signFiles(Signer.java:242)                                                                 
        at net.sf.jsignpdf.Signer.main(Signer.java:137)                                                                      
INFO  Finished: Creating of signature failed.                      

play play

unread,
Aug 15, 2018, 1:18:20 PM8/15/18
to JSignPdf
I get to solve it. Basically keystore was not setup ... anyone have used IBMI5OSKEYSTORE / IBMISERIESKEYSTORE  by any chance? Thanks in advance !!
Reply all
Reply to author
Forward
0 new messages