2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
6 openssl-verify - certificate verification command
17 [B<-untrusted> I<file>]
18 [B<-vfyopt> I<nm>:I<v>]
19 {- $OpenSSL::safe::opt_name_synopsis -}
20 {- $OpenSSL::safe::opt_trust_synopsis -}
21 {- $OpenSSL::safe::opt_engine_synopsis -}
22 {- $OpenSSL::safe::opt_v_synopsis -}
23 {- $OpenSSL::safe::opt_provider_synopsis -}
27 =for openssl ifdef engine
31 This command verifies certificate chains.
39 Print out a usage message.
41 =item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
43 See L<openssl(1)/Trusted Certificate Options> for more information.
45 =item B<-CRLfile> I<file>
47 The I<file> should contain one or more CRLs in PEM format.
48 This option can be specified more than once to include CRLs from multiple
51 =item B<-crl_download>
53 Attempt to download CRL information for this certificate.
57 Display information about the certificate chain that has been built (if
58 successful). Certificates in the chain that came from the untrusted list will be
59 flagged as "untrusted".
63 Print extra information about the operations being performed.
65 =item B<-trusted> I<file>
67 A file of trusted certificates.
69 =item B<-untrusted> I<file>
71 A file of untrusted certificates.
73 =item B<-vfyopt> I<nm>:I<v>
75 Pass options to the signature algorithm during verify operations.
76 Names and values of these options are algorithm-specific.
78 {- $OpenSSL::safe::opt_name_item -}
80 {- $OpenSSL::safe::opt_engine_item -}
81 To load certificates or CRLs that require engine support, specify the
82 B<-engine> option before any of the
83 B<-trusted>, B<-untrusted> or B<-CRLfile> options.
85 {- $OpenSSL::safe::opt_trust_item -}
87 {- $OpenSSL::safe::opt_v_item -}
89 {- $OpenSSL::safe::opt_provider_item -}
93 Indicates the last option. All arguments following this are assumed to be
94 certificate files. This is useful if the first certificate filename begins
97 =item I<certificate> ...
99 One or more certificates to verify. If no certificates are given,
100 this command will attempt to read a certificate from standard input.
101 Certificates must be in PEM format.
102 If a certificate chain has multiple problems, this program tries to
109 When a verify operation fails the output messages can be somewhat cryptic. The
110 general form of the error message is:
112 server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
113 error 24 at 1 depth lookup:invalid CA certificate
115 The first line contains the name of the certificate being verified followed by
116 the subject name of the certificate. The second line contains the error number
117 and the depth. The depth is number of the certificate being verified when a
118 problem was detected starting with zero for the certificate being verified itself
119 then 1 for the CA that signed the certificate and so on. Finally a text version
120 of the error number is presented.
122 A list of the error codes and messages can be found in
123 L<X509_STORE_CTX_get_error(3)>; the full list is defined in the header file
124 F<< <openssl/x509_vfy.h> >>.
126 This command ignores many errors, in order to allow all the problems with a
127 certificate chain to be determined.
131 Although the issuer checks are a considerable improvement over the old
132 technique they still suffer from limitations in the underlying X509_LOOKUP
133 API. One consequence of this is that trusted certificates with matching
134 subject name must either appear in a file (as specified by the B<-CAfile>
135 option), a directory (as specified by B<-CApath>), or a store (as specified
136 by B<-CAstore>). If they occur in more than one location then only the
137 certificates in the file will be recognised.
139 Previous versions of OpenSSL assume certificates with matching subject
140 name are identical and mishandled them.
142 Previous versions of this documentation swapped the meaning of the
143 B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT> and
144 B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY> error codes.
150 L<ossl_store-file(7)>
154 The B<-show_chain> option was added in OpenSSL 1.1.0.
158 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
160 Licensed under the Apache License 2.0 (the "License"). You may not use
161 this file except in compliance with the License. You can obtain a copy
162 in the file LICENSE in the source distribution or at
163 L<https://www.openssl.org/source/license.html>.