Working with openssl and pkcs12 files

Extract the private key without password (encryption) from your pkcs12 file
openssl >pkcs12 –in keyexport.pfx –nocerts –nodes –out keyexport.prv
Enter the password used to create your pkcs12 (.pfx) file

Extract the private with password (encryption) from your pkcs12 file
openssl >pkcs12 –in keyexport.pfx –nocerts –out keyexport.prv
Enter the password used to create your pkcs12 (.pfx) file

Extract the public key from your pkcs12 file
openssl>pkcs12 –in keyexport.pfx –nokeys –out keyexport.pub
Enter the password used to create your pkcs12 (.pfx) file

Generate a new pkcs12 from your public and private key
openssl>pkcs12 –export –in keyexport.pub –inkey keyexport.prv –out newkey.pfx

Give your certificate a friendly name
openssl>pkcs12 –export –in keyexport.pub –inkey keyexport.prv –out newkey.pfx –name “Friendly name” *

Check CSRs
openssl req -in mycsr.csr -noout -text

 

This entry was posted in PKI and tagged , . Bookmark the permalink.