I have created PKCS12 file using private key and the public certificate using openssl. I am trying to import the PCKS12, but getting error keystore password was correct. I have added password in the command line argument as below:
openssl pkcs12 -export -in myCert.cer -inkey privatekey.key -out pkcs12.p12 -name somename -password pass:someSecret2022
Then I am using following keytool command :
keytool -importkeystore -srckeystore pkcs12.p12 -srcstoretype pkcs12 -destkeystore some.jks -deststoretype jks -srcstorepass someSecret2022 -deststorepass changeit
I keep getting error
keytool error: java.io.IOException: keystore password was incorrect
On top of that I used the same pcks12.p12
file to import within Windows and it accepts the above password.
I am using zulu 8 java version 1.8.0_322
and openssl version 3.0.3.
Thank you for your help.