Memos - OpenSSL helper

Generation

Self signed certificate

openssl req -x509 -sha256 -nodes -days 1825 -newkey rsa:4096 -keyout server.key -out server.crt -subj "/C=fr/O=flavinus/CN=test.com"

Utils

Show certificate content

openssl x509 -in server.crt -text

Show server certificate

openssl s_client -showcerts -connect 192.168.0.1:443 -servername test.com

Notions

CA A certificate authority (CA) is a trusted organization that publish digital certificates and certifies other certificates.

Vocabulary

CN CN (Common Name) usually indicate the host/server/name protected by the SSL certificate. Deprecated.

SAN SAN (Subject Alternative Name) is a way to indicate all domain names or IPS secured by a certificate.

File extensions

DER Binary format certificate.

PEM Base64 encoded certificate.

Extensions: .der, .cer