The Linux Page

OpenSSL commands working with certificates

Handling Certificate under Linux

The following are some commands I use to read certificate and otherwise work with OpenSSL which I otherwise find somewhat difficult to use.

To read a certificate, you use the -text and -noout to get the result in stdout. Use the -in to specify the

openssl x509 -text -noout -in server.pem

The first parameter is the type of of key. I'm not sure where you should use what, but in general you can use x509 (csr file) and rsa (rsa files). I'm not too sure why they cannot just detect what's what...

Assuming you were able to install your .pem certificate and private key on your HTTP server, you can also see it in your browser. For Firefox, this is still found under the:

Page Info » Security » View Certificate

Note that the version in that data refers to the PEM format and not the certificate version (i.e. whether you are using TLS or SSL). For example, in 2022 we are using x.509 v3 (the output, however, just says "Version: 3").