openssl x509
The OpenSSL command for displaying, converting and signing X.509 certificates.
In more detail
With -noout and field options it prints parts of a certificate, such as the issuer, subject, serial number, dates and subject alternative names, which is the everyday way to inspect one. With -req it acts as a simple certificate authority, turning a signing request into a certificate signed by a given authority key. It also converts between PEM and binary formats.
Examples
openssl x509 -req -in www.csr -CA ca.pem -CAkey ca.key -out www.pem -copy_extensions copy -set_serial 4096openssl x509 -in cert.pem -noout -subject -issuer -dates -ext subjectAltNameRelated terms
- X.509 certificate — A signed document binding a public key to a name, issued by a certificate authority, used by TLS to prove identity.
- openssl req — The OpenSSL command that creates certificate signing requests, and with the -x509 option creates a self-signed certificate instead.
- PEM — A text format for storing keys and certificates, where the binary data is written as Base64 between labelled begin and end lines.
- OpenSSL — A widely used toolkit and library for cryptography and TLS, including the openssl command-line tool.
Taught in
- Public Key Infrastructure: X.509 Certificates & CAs — Cybersecurity Fundamentals, GRC & Cryptography
- Security Capstone Review & Certification — Cybersecurity Fundamentals, GRC & Cryptography