Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combining a p7b file and private key into .pfx file

I created a CSR using an online-tool which gave me a textual CSR and a RSA Private Key in text format. I then submitted the CSR to the authority I am using who gave me back a p7b file.

Can anyone please let me know how do I take this p7b file and combine it with the private key that I have in textual format? I would then need to export the whole thing as a pfx file including the merged private key. However once the p7b file is merged with the private key and the cert is installed on my box I can handle the export myself.

like image 551
Nikhil Avatar asked Sep 02 '25 09:09

Nikhil


1 Answers

You could do this with openssl. We have the certificates cert.p7b and the private key cert.key.

openssl pkcs7 -print_certs -in cert.p7b -out cert.cer

openssl pkcs12 -export -in cert.cer -inkey cert.key -out cert.pfx 
like image 93
ikreb Avatar answered Sep 05 '25 00:09

ikreb