Skip to content

Instantly share code, notes, and snippets.

@jmervine
Created November 17, 2014 21:57
Show Gist options
  • Star 35 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save jmervine/e4c9af3adb14b78856cc to your computer and use it in GitHub Desktop.
Save jmervine/e4c9af3adb14b78856cc to your computer and use it in GitHub Desktop.
openssl: convert cert from p7b to crt (or cer)
openssl pkcs7 -print_certs -in old.p7b -out new.crt
# openssl pkcs7 -print_certs -in old.p7b -out new.cer
@ocafebabe
Copy link

Thanks!

@Feriman22
Copy link

Thanks!

@Nenodema
Copy link

Nenodema commented May 3, 2021

Thanks!

@mrazekl
Copy link

mrazekl commented Nov 24, 2021

thank you

@parools
Copy link

parools commented Aug 31, 2022

Saved my life too !

@realtebo
Copy link

Thanks, but how to output to file ONLY the certificate?

I got some trailing lines in my case

subject=C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2

issuer=C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment