openssl-verify1ssl
Certificate verification command
Usage
openssl verify
[-help]
[{-CRLfile
filename | uri}]
[-crl_download]
[-show_chain]
[-verbose]
[{-trusted
filename | uri}]
[{-untrusted
filename | uri}]
[-vfyopt
nm:v]
[-nameopt
option]
[-CAfile
file]
[-no-CAfile]
[-CApath
dir]
[-no-CApath]
[-CAstore
uri]
[-no-CAstore]
[-engine
id]
[-allow_proxy_certs]
[-attime
timestamp]
[-no_check_time]
[-check_ss_sig]
[-crl_check]
[-crl_check_all]
[-explicit_policy]
[-extended_crl]
[-ignore_critical]
[-inhibit_any]
[-inhibit_map]
[-partial_chain]
[-policy
arg]
[-policy_check]
[-policy_print]
[-purpose
purpose]
[-suiteB_128]
[-suiteB_128_only]
[-suiteB_192]
[-trusted_first]
[-no_alt_chains]
[-use_deltas]
[-auth_level
num]
[-verify_depth
num]
[-verify_email
email]
[-verify_hostname
hostname]
[-verify_ip
ip]
[-verify_name
name]
[-x509_strict]
[-issuer_checks]
[-provider
name]
[-provider-path
path]
[-provparam
[name:]
key=value]
[-propquery
propq]
[--]
[certificate ...]
Overview
This command verifies certificate chains. If a certificate chain has multiple problems, this program attempts to display all of them.
Options
-
-help -
Print out a usage message.
-
-CRLfile filename|uri -
The file or URI should contain one or more CRLs in PEM or DER format. This option can be specified more than once to include CRLs from multiple sources.
-
-crl_download -
Attempt to download CRL information for certificates via their CDP entries.
-
-show_chain -
Display information about the certificate chain that has been built (if successful). Certificates in the chain that came from the untrusted list will be flagged as "untrusted".
-
-verbose -
Print extra information about the operations being performed.
-
-trusted filename|uri -
A file or URI of (more or less) trusted certificates. See openssl-verification-options(1) for more information on trust settings.
This option can be specified more than once to load certificates from multiple sources.
-
-untrusted filename|uri -
A file or URI of untrusted certificates to use for chain building. This option can be specified more than once to load certificates from multiple sources.
-
-vfyopt nm:v -
Pass options to the signature algorithm during verify operations. Names and values of these options are algorithm-specific.
-
-nameopt option -
This specifies how the subject or issuer names are displayed. See openssl-namedisplay-options(1) for details.
-
-engine id -
See "Engine Options" in openssl(1). This option is deprecated.
To load certificates or CRLs that require engine support, specify the
-engineoption before any of the-trusted,-untrustedor-CRLfileoptions.
-
-CAfile file, -no-CAfile, -CApath dir, -no-CApath, -CAstore uri, -no-CAstore -
See "Trusted Certificate Options" in openssl-verification-options(1) for details.
-allow_proxy_certs,-attime,-no_check_time,-check_ss_sig,-crl_check,-crl_check_all,-explicit_policy,-extended_crl,-ignore_critical,-inhibit_any,-inhibit_map,-no_alt_chains,-partial_chain,-policy,-policy_check,-policy_print,-purpose,-suiteB_128,-suiteB_128_only,-suiteB_192,-trusted_first,-use_deltas,-auth_level,-verify_depth,-verify_email,-verify_hostname,-verify_ip,-verify_name,-x509_strict-issuer_checks-
Set various options of certificate chain verification. See "Verification Options" in openssl-verification-options(1) for details.
-
-provider name
-
-provider-path path
-
-provparam [name:]key=value
-
-propquery propq -
See "Provider Options" in openssl(1), provider(7), and property(7).
-
-- -
Indicates the last option. All arguments following this are assumed to be certificate files. This is useful if the first certificate filename begins with a
-.
- certificate ...
-
One or more target certificates to verify, one per file. If no certificates are given, this command will attempt to read a single certificate from standard input.
Note that the first parameter that does not begin with a - ends the list of options and starts the list of certificates. If you place any options after a certificate filename, they will be interpreted not as options but as certificates.
Diagnostics
When a verify operation fails the output messages can be somewhat cryptic. The general form of the error message is:
server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)error 24 at 1 depth lookup:invalid CA certificate
The first line contains the name of the certificate being verified followed by the subject name of the certificate. The second line contains the error number and the depth. The depth is number of the certificate being verified when a problem was detected starting with zero for the target ("leaf") certificate itself then 1 for the CA that signed the target certificate and so on. Finally a textual version of the error number is presented.
A list of the error codes and messages can be found in X509_STORE_CTX_get_error(3); the full list is defined in the header file <openssl/x509_vfy.h>.
This command ignores many errors, in order to allow all the problems with a certificate chain to be determined.
Releases
6 releases since Debian 9 (Stretch); the text changed 5 times.
-- since Debian 12 (Bookworm);
-CAstore since Debian 12 (Bookworm);
-nameopt since Debian 10 (Buster);
-no-CAstore since Debian 12 (Bookworm);
-propquery since Debian 12 (Bookworm);
-provider since Debian 12 (Bookworm);
-provider-path since Debian 12 (Bookworm);
-provparam since Debian 13 (Trixie);
-vfyopt since Debian 12 (Bookworm).
-allow_proxy_certs until Debian 11 (Bullseye);
-attime until Debian 11 (Bullseye);
-auth_level until Debian 11 (Bullseye);
-check_ss_sig until Debian 11 (Bullseye);
-crl_check until Debian 11 (Bullseye);
-crl_check_all until Debian 11 (Bullseye);
-explicit_policy until Debian 11 (Bullseye);
-extended_crl until Debian 11 (Bullseye);
-ignore_critical until Debian 11 (Bullseye);
-inhibit_any until Debian 11 (Bullseye);
-inhibit_map until Debian 11 (Bullseye);
-no_alt_chains until Debian 11 (Bullseye);
-no_check_time until Debian 11 (Bullseye);
-partial_chain until Debian 11 (Bullseye);
-policy until Debian 11 (Bullseye);
-policy_check until Debian 11 (Bullseye);
-policy_print until Debian 11 (Bullseye);
-purpose until Debian 11 (Bullseye);
-suiteB_128 until Debian 11 (Bullseye);
-suiteB_128_only until Debian 11 (Bullseye);
-suiteB_192 until Debian 11 (Bullseye);
-trusted_first until Debian 11 (Bullseye);
-use_deltas until Debian 11 (Bullseye);
-verify_depth until Debian 11 (Bullseye);
-verify_email until Debian 11 (Bullseye);
-verify_hostname until Debian 11 (Bullseye);
-verify_ip until Debian 11 (Bullseye);
-verify_name until Debian 11 (Bullseye);
-x509_strict until Debian 11 (Bullseye).