Print

Print


Hi Stijn,

 

In reaction to our correspondence end of April, I’m currently working on a trimmed down version of the ACM to be able to sign simple attribute certificates using the command line.

In this process I stumbled upon P12SecurityTest.java on the web. Which reproduces exactly the same error as I get using my own implementation:

 

Embedded: iaik.pkcs.PKCSException: java.security.InvalidAlgorithmParameterException: Padding error: javax.crypto.BadPaddingException: Given final block not properly padded

  at iaik.pkcs.pkcs12.AuthenticatedSafe.decrypt(Unknown Source)

  at iaik.pkcs.pkcs12.PKCS12.decrypt(Unknown Source)

  at issrg.security.PKCS12Security.login(PKCS12Security.java:99)

  at P12SecurityTest.main(P12SecurityTest.java:30)

 

l3tM3InNow permis.p12 - Failed to log in

 

I’m using a single line input file containing: “l3tM3InNow permis.p12” (without the quotes).  

Reckoning you might have encountered this problem before I’m hoping you could point me in the right direction. Maybe I’m missing some environmental settings? (e.g. java.security) or is the java version an ussue? (using java version "1.6.0_24", Java(TM) SE Runtime Environment (build 1.6.0_24-b07), Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)). I also encountered hint towards not using the toCharArray due to padding issues, yet in-code specification of the password as char[] was to no avail.

 

 

Kind Regards,

 

Jan Willem Beusink