Friday, June 10, 2016

How to: some openssl command to convert ssl certificates

During last days I've reorganized our certificate SSL archive so i like to post some of openssl commands that maybe could be helpful to someone else:

openssl command to view info and expiring date of crt file

openssl x509 -in certificate.crt -text -noout

openssl command to view a  info about a  p12 file

openssl pkcs12 -info -in keysha2.p12

openssl commad to extract crt and key from p12

openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys
openssl pkcs12 -in path.p12 -out newfile.key.pem -nocerts -nodes

openssl commad to build a p12 from crt and key

openssl pkcs12 -export -out certificate.p12 -inkey cert.key -in cert.crt -certfile cert.crt

No comments:

Post a Comment