how to add/convert certificate file into pkcs12 file

Rohit picture Rohit · Dec 9, 2013 · Viewed 13.6k times · Source

I have received the three certificates(.CER files) to access the production server. How I am going to add/convert these certificates into PKCS12 file.

Answer

Atul Soman picture Atul Soman · Dec 9, 2013

First export your certificates to a keystore and then import the keystore as a pkcs12 file. If you jave java installed you can use keytool command to accomplish both.

1) /jre/bin/keytool -importcert -alias cert1 -keystore keystore.jks -file Cert1.cer
2) /jre/bin/keytool -importkeystore -srckeystore keystore.jks -srcalias cert1 -destkeystore keystore.p12 -deststoretype PKCS12


Similar steps can be done using openssl too.