openssl View pem format certificate details

openssl x509 command section

Print out the contents of the certificate:
openssl x509 -in cert.pem -noout -text
prints out the certificate serial number
openssl -serial x509 -in cert.pem -noout
print out the certificate owner name
openssl x509 -in cert.pem -noout -subject
printed in the format specified in RFC2253 name of the owner of the certificate
openssl x509 -in cert.pem -noout -subject -nameopt RFC2253
support UTF8 terminal prints out a row over the name of the owner of the certificate
openssl x509 -in cert.pem - noout -subject -nameopt oneline -nameopt -escmsb
print out characteristic parameters MD5 certificate
openssl x509 -in cert.pem -noout -fingerprint
print out characteristic parameters SHA certificate
openssl x509 -sha1 -in cert.pem -noout -fingerprint
the PEM DER certificate format is converted into the format
openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER
to a certificate converted to the CSR
OpenSSL X509 -x509toreq -IN cert.pem -out req.pem -signkey the key.pem
A CSR to be processed, issue digital signature certificates, increased CA extensions
openssl x509 -req -in careq.pem -extfile openssl.cnf -extensions v3_ca -signkey key.pem -out cacert.pem
to signing a CSR, increase user certificate extensions
openssl x509 -req -in req.pem -extfile openssl.cnf -extensions v3_usr -CA cacert.pem -CAkey key.pem -CAcreateserial

Guess you like

Origin www.cnblogs.com/codedoge/p/11505050.html