I am using edtFTPj/PRO to send files to an IBM mainframe. We have a new certificate that was issued by the mainframe and it appears to be a good certificate. The new certificate looks very much like the one we are using successfully in production.
I am getting the following error and I am looking for direction on how to fix it.
com.enterprisedt.cryptix.CryptixException: PKCS#5: Invalid number of padding bytes
My full screen shot is below:
[sv-wm-d@appedxdv1 IntegrationServer]$ java com.egateway.MF.wmPush2MF_new /app/data/sv-wm-d/test/roy "'PG17678.TEST.EDI.INB.DASR.MAP.EDIX.TEST'" SYSA-FTP.SDGE.COM QEDIXFTP A /app/dv/webMethods82/IntegrationServer/QEDIXFTP.CERT4South.pem P
Setting SSL debugging to :all
CLIENT KEY FILENAME /app/dv/webMethods82/IntegrationServer/QEDIXFTP.CERT4South.pem
Creating FTPS (explicit) client
host=SYSA-FTP.SDGE.COM
username=QEDIXFTP
serverCertFilename=/app/dv/webMethods82/IntegrationServer/QEDIXFTP.CERT4South.pem
clientKeyFilename=/app/dv/webMethods82/IntegrationServer/QEDIXFTP.CERT4South.pem
clientKeyPassword=QEDIXFTP
action, code=P
action, append=false
absolutePath=/app/data/sv-wm-d/test/roy
com.enterprisedt.cryptix.CryptixException: PKCS#5: Invalid number of padding bytes
at com.enterprisedt.cryptix.provider.padding.PKCS5.engineUnpad(PKCS5.java:129)
at xjava.security.PaddingScheme.unpad(PaddingScheme.java:325)
at xjava.security.Cipher.a(Cipher.java:1468)
at xjava.security.Cipher.crypt(Cipher.java:1156)
at xjava.security.Cipher.crypt(Cipher.java:1116)
at com.enterprisedt.net.puretls.crypto.a.a(PEMData.java:139)
at com.enterprisedt.net.puretls.crypto.EAYEncryptedPrivateKey.createPrivateKey(EAYEncryptedPrivateKey.java:59)
at com.enterprisedt.net.puretls.SSLContext.loadEAYKeyFile(SSLContext.java:287)
at com.enterprisedt.net.puretls.SSLContext.loadEAYKeyFile(SSLContext.java:239)
at com.enterprisedt.net.ftp.ssl.SSLFTPClient.loadClientCertificate(SSLFTPClient.java:1243)
at com.egateway.MF.wmPush2MF_new.main(wmPush2MF_new.java:116)
com.enterprisedt.cryptix.CryptixException: PKCS#5: Invalid number of padding bytes
at com.enterprisedt.cryptix.provider.padding.PKCS5.engineUnpad(PKCS5.java:129)
at xjava.security.PaddingScheme.unpad(PaddingScheme.java:325)
at xjava.security.Cipher.a(Cipher.java:1468)
at xjava.security.Cipher.crypt(Cipher.java:1156)
at xjava.security.Cipher.crypt(Cipher.java:1116)
at com.enterprisedt.net.puretls.crypto.a.a(PEMData.java:139)
at com.enterprisedt.net.puretls.crypto.EAYEncryptedPrivateKey.createPrivateKey(EAYEncryptedPrivateKey.java:59)
at com.enterprisedt.net.puretls.SSLContext.loadEAYKeyFile(SSLContext.java:287)
at com.enterprisedt.net.puretls.SSLContext.loadEAYKeyFile(SSLContext.java:239)
at com.enterprisedt.net.ftp.ssl.SSLFTPClient.loadClientCertificate(SSLFTPClient.java:1243)
at com.egateway.MF.wmPush2MF_new.main(wmPush2MF_new.java:116)