Product: OpenSSL
Version: Any
OS: Windows, Linux, HP-UX, AIX, Solaris
Command: openssl
This is a small post sharing OpenSSL utility's usage to display SSL certificate.
Following are 4 openssl syntax to view 4 different SSL certificate file types:
Format | Command | Usage |
DER X.509 | openssl x509 -noout -text -in [ssl_cert].crt -inform DER | Windows default |
DER PKCS#7 | openssl pkcs7 -print_certs -in [ssl_cert].p7b -inform DER | Windows default |
PEM Base-64 X.509 | openssl x509 -noout -text -in [ssl_cert].crt | Not Windows default |
PEM PKCS#7 | openssl pkcs7 -print_certs -in [ssl_cert].p7b | Not available in Windows |
Following is the trick to determine whether the file is DER or PEM encoded by opening using text editor:
- DER - file content is binary format that is not human readable
- PEM - file content is human readable text format, which is Base-64 encoded
For clarification, "PEM X.509" SSL file format is called as "Base-64 X.509" format in Windows OS
No comments:
Post a Comment