Openssl view crt file
- openssl show
- openssl show cert info
- openssl show certificate
- openssl show certificate chain
Openssl show certificate chain pem.
Useful OpenSSL command to view Certificate Content
In this tutorial I will share openssl commands to view the content of different types of certificates such as
- Certificate Signing Request (CSR)
- Subject Alternative Name (SAN) certificate
- server or client certificate
- Certificate Authority (CA)
View the content of Private Key
We generate a private key with encryption using following command which will prompt for passphrase:
~]# openssl genrsa -des3 -out ca.key 4096To view the content of this private key we will use following syntax:
~]# openssl rsa -noout -text -in <PRIVATE_KEY>So in our case the command would be:
~]# openssl rsa -noout -text -in ca.keySample output from my terminal (output is trimmed):
View the content of CSR (Certificate Signing Request)
We can use the following command to generate a CSR using the key we created in the previous example:
~]# openssl req -new -key ca.key -out client.csrSyntax to view the content of this CSR:
~]# openssl req -noout -text -in <CSR_FILE>Sample output from my terminal: