Created
November 17, 2014 21:57
-
-
Save jmervine/e4c9af3adb14b78856cc to your computer and use it in GitHub Desktop.
openssl: convert cert from p7b to crt (or cer)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl pkcs7 -print_certs -in old.p7b -out new.crt | |
# openssl pkcs7 -print_certs -in old.p7b -out new.cer |
mine too
thank you!!!!
this example also works for the files *.pkcs7 !
Thanks, jmervine!
I got an error, saying
unable to load PKCS7 object
so I did
openssl pkcs7 -inform der -in a.p7b -out a.cer
and this helped me.
openssl pkcs7 -inform der -in a.p7b -out out.cer
return 0 exit code, but didn't work for further request.
So I did the following:
1 - openssl pkcs7 -print_certs -inform der -in a.p7c -out out.cer
2 - curl -E out.cer --key some_client_for_auth.key -X GET http://example.com
And then I get success response(200).
I love you!!!!!! <3
Thanks!
Thanks!
Thanks!
thank you
Saved my life too !
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
It saved my life. Thanks a lot