How to extract private key from pfx file using openssl? -


i looking private key add ssl certificate in softlayer's "add certificate" wizard , use further local load balancer.

i googled , tried following openssl command:

openssl pkcs12 -in filename.pfx -nocerts -out key.pem 

but ended invalid "rsa private key". please help.

your command correct, , give result encrypted private key in pkcs#8 format. if need unencrypted private key, add -nodes options.

openssl pkcs12 -in filename.pfx -nocerts -nodes -out key.pem

if need private key in old rsa format, should convert given key openssl pkcs8 command.

openssl pkcs8 -in key.pem -out rsakey.pem

see documentations details:


Comments