

Openssl rsa -in example.key -noout -modulus In the commands below, replace with the key size (For example, 2048, 4096, 8192). For example, I skip encryption and decryption, or using openssl for CA management. Surely, this is not a complete list, but it covers the most common use cases and includes those I’ve been working with. Manually check certificate revocation status from OCSP responder.Convert between encoding (PEM, DER) and container formats (PKCS12, PKCS7).Measure TLS connection and handshake time.TLS client to connect to a remote server.Calculate message digests and base64 encoding.

Create certificate signing requests (CSR).Here is a list of use cases, that I’ll be covering: This post is my personal collection of openssl command snippets and examples, grouped by use case. man pages are not so helpful here, so often we just Google “openssl how to ” or look for some kind of “openssl cheatsheet” to recall the usage of a command and see examples.

OpenSSL includes tonnes of features covering a broad range of use cases, and it’s difficult to remember its syntax for all of them and quite easy to get lost. When it comes to security-related tasks, like generating keys, CSRs, certificates, calculating digests, debugging TLS connections and other tasks related to PKI and HTTPS, you’d most likely end up using the OpenSSL tool.
