0

I have the certificate in P7B format and along with I have private key data in text file format as below. Can anyone please help how can I generate the PFX certificate using this data?

-----BEGIN PRIVATE KEY-----
// Long Encrypted text
-----END PRIVATE KEY-----
sumit vedi
  • 119
  • 2
  • 7
  • This isn't really a programming question and should be offtopic, but has been asked and answered long before topicality was developed: https://stackoverflow.com/questions/808669/convert-a-cert-pem-certificate-to-a-pfx-certificate – dave_thompson_085 Apr 16 '20 at 09:30

1 Answers1

0
  1. Convert PKCS#7 (P7B) to PEM:
openssl pkcs7 -inform der -in a.p7b -out a.cer
  1. Merge KEY and PEM to PKCS#12 (PFX)
openssl pkcs12 -export -out a.pfx -inkey a.key -in a.cer"
Daniel Fisher lennybacon
  • 3,865
  • 1
  • 30
  • 38