openssl verify
The OpenSSL command that checks whether a certificate chains to a trusted root and passes the other checks a client would make.
In more detail
You tell it which roots to trust with -CAfile and which intermediates to use with -untrusted. Options let it check a host name, test the certificate at a chosen date and consult a revocation list, and on failure it prints the exact check that failed, such as hostname mismatch or certificate has expired. It is the quickest way to reproduce a browser's certificate errors from the command line.
Examples
openssl verify -CAfile ca.pem -attime $OCT_1 -verify_hostname www.example.com www.pemopenssl verify -CAfile ca.pem -crl_check -CRLfile crl.pem www.pemRelated terms
- certificate chain — The sequence of certificates from a server's certificate, through one or more intermediate certificates, up to a trusted root.
- trust store — The list of root certificate authorities a client trusts, usually supplied by the operating system or passed explicitly.
- CRL — A list, signed and published by a certificate authority, of the serial numbers of certificates it has revoked before their expiry.
- 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