Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@voquanghoa

This comment has been minimized.

Copy link

commented Jul 6, 2016

It saved my life. Thanks a lot

@vladkras

This comment has been minimized.

Copy link

commented May 24, 2017

mine too

@ozarembo

This comment has been minimized.

Copy link

commented Aug 21, 2017

thank you!!!!

@salvakexx

This comment has been minimized.

Copy link

commented Nov 10, 2017

this example also works for the files *.pkcs7 !
Thanks, jmervine!

@mcelhennyi

This comment has been minimized.

Copy link

commented Jan 18, 2018

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.

@zhisme

This comment has been minimized.

Copy link

commented Mar 23, 2018

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).

@leighhalliday

This comment has been minimized.

Copy link

commented Jul 6, 2018

I love you!!!!!! <3

@ocafebabe

This comment has been minimized.

Copy link

commented Mar 1, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.