We can also read and print PKCS12 files which can be used store keys and related information. $ openssl s_client -showcerts -connect :443 Read Web Sites HTTPS TLS/SSL Certificates Read PKCS12 File We can print the SSL/TLS X509 certificate with the following command. We can read and print web sites HTTPS certificates with the s_client verb which is explained in this tutorial. $ openssl x509 -in mycert.pem -text -noout -purpose Read Web Sites HTTPS TLS/SSL Certificates We can print certificate purpose with the -purpose command like below. This will be beneficial while using certificate to learn the creation aim of the certificate. X509 certificates also holds information about the purpose of the cerficate. $ openssl x509 -in mycert.pem -text -noout Print Certificate Purpose We will use x509 version with the following command. We can see that the first line of command output provides RSA key ok Read X509 CertificateĪnother case reading certificate with OpenSSL is reading and printing X509 certificates to the terminal. $ openssl rsa -in myprivate.pem -check Read RSA Private Key We can use rsa verb to read RSA private key with the following command. RSA is popular format use to create asymmetric key pairs those named public and private key.
#Openssl read certificate how to
We will look how to read these certificate formats with OpenSSL. OpenSSL supports certificate formats like RSA, X509, PCKS12 etc. OpenSSL provides read different type of certificate and encoding formats.