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.pem
openssl verify -CAfile ca.pem -crl_check -CRLfile crl.pem www.pem

Related terms

Taught in

References