xref: /freebsd/crypto/openssl/doc/man1/openssl-verify.pod.in (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery=pod
2*b077aed3SPierre Pronchery{- OpenSSL::safe::output_do_not_edit_headers(); -}
3*b077aed3SPierre Pronchery
4*b077aed3SPierre Pronchery=head1 NAME
5*b077aed3SPierre Pronchery
6*b077aed3SPierre Proncheryopenssl-verify - certificate verification command
7*b077aed3SPierre Pronchery
8*b077aed3SPierre Pronchery=head1 SYNOPSIS
9*b077aed3SPierre Pronchery
10*b077aed3SPierre ProncheryB<openssl> B<verify>
11*b077aed3SPierre Pronchery[B<-help>]
12*b077aed3SPierre Pronchery[B<-CRLfile> I<filename>|I<uri>]
13*b077aed3SPierre Pronchery[B<-crl_download>]
14*b077aed3SPierre Pronchery[B<-show_chain>]
15*b077aed3SPierre Pronchery[B<-verbose>]
16*b077aed3SPierre Pronchery[B<-trusted> I<filename>|I<uri>]
17*b077aed3SPierre Pronchery[B<-untrusted> I<filename>|I<uri>]
18*b077aed3SPierre Pronchery[B<-vfyopt> I<nm>:I<v>]
19*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_name_synopsis -}
20*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_trust_synopsis -}
21*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_v_synopsis -}
22*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_provider_synopsis -}
23*b077aed3SPierre Pronchery[B<-->]
24*b077aed3SPierre Pronchery[I<certificate> ...]
25*b077aed3SPierre Pronchery
26*b077aed3SPierre Pronchery=head1 DESCRIPTION
27*b077aed3SPierre Pronchery
28*b077aed3SPierre ProncheryThis command verifies certificate chains. If a certificate chain has multiple
29*b077aed3SPierre Proncheryproblems, this program attempts to display all of them.
30*b077aed3SPierre Pronchery
31*b077aed3SPierre Pronchery=head1 OPTIONS
32*b077aed3SPierre Pronchery
33*b077aed3SPierre Pronchery=over 4
34*b077aed3SPierre Pronchery
35*b077aed3SPierre Pronchery=item B<-help>
36*b077aed3SPierre Pronchery
37*b077aed3SPierre ProncheryPrint out a usage message.
38*b077aed3SPierre Pronchery
39*b077aed3SPierre Pronchery=item B<-CRLfile> I<filename>|I<uri>
40*b077aed3SPierre Pronchery
41*b077aed3SPierre ProncheryThe file or URI should contain one or more CRLs in PEM or DER format.
42*b077aed3SPierre ProncheryThis option can be specified more than once to include CRLs from multiple
43*b077aed3SPierre Proncherysources.
44*b077aed3SPierre Pronchery
45*b077aed3SPierre Pronchery=item B<-crl_download>
46*b077aed3SPierre Pronchery
47*b077aed3SPierre ProncheryAttempt to download CRL information for certificates via their CDP entries.
48*b077aed3SPierre Pronchery
49*b077aed3SPierre Pronchery=item B<-show_chain>
50*b077aed3SPierre Pronchery
51*b077aed3SPierre ProncheryDisplay information about the certificate chain that has been built (if
52*b077aed3SPierre Proncherysuccessful). Certificates in the chain that came from the untrusted list will be
53*b077aed3SPierre Proncheryflagged as "untrusted".
54*b077aed3SPierre Pronchery
55*b077aed3SPierre Pronchery=item B<-verbose>
56*b077aed3SPierre Pronchery
57*b077aed3SPierre ProncheryPrint extra information about the operations being performed.
58*b077aed3SPierre Pronchery
59*b077aed3SPierre Pronchery=item B<-trusted> I<filename>|I<uri>
60*b077aed3SPierre Pronchery
61*b077aed3SPierre ProncheryA file or URI of (more or less) trusted certificates.
62*b077aed3SPierre ProncherySee L<openssl-verification-options(1)> for more information on trust settings.
63*b077aed3SPierre Pronchery
64*b077aed3SPierre ProncheryThis option can be specified more than once to load certificates from multiple
65*b077aed3SPierre Proncherysources.
66*b077aed3SPierre Pronchery
67*b077aed3SPierre Pronchery=item B<-untrusted> I<filename>|I<uri>
68*b077aed3SPierre Pronchery
69*b077aed3SPierre ProncheryA file or URI of untrusted certificates to use for chain building.
70*b077aed3SPierre ProncheryThis option can be specified more than once to load certificates from multiple
71*b077aed3SPierre Proncherysources.
72*b077aed3SPierre Pronchery
73*b077aed3SPierre Pronchery=item B<-vfyopt> I<nm>:I<v>
74*b077aed3SPierre Pronchery
75*b077aed3SPierre ProncheryPass options to the signature algorithm during verify operations.
76*b077aed3SPierre ProncheryNames and values of these options are algorithm-specific.
77*b077aed3SPierre Pronchery
78*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_name_item -}
79*b077aed3SPierre Pronchery
80*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_engine_item -}
81*b077aed3SPierre Pronchery{- output_off() if $disabled{"deprecated-3.0"}; "" -}
82*b077aed3SPierre ProncheryTo load certificates or CRLs that require engine support, specify the
83*b077aed3SPierre ProncheryB<-engine> option before any of the
84*b077aed3SPierre ProncheryB<-trusted>, B<-untrusted> or B<-CRLfile> options.
85*b077aed3SPierre Pronchery{- output_on() if $disabled{"deprecated-3.0"}; "" -}
86*b077aed3SPierre Pronchery
87*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_trust_item -}
88*b077aed3SPierre Pronchery
89*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_v_item -}
90*b077aed3SPierre Pronchery
91*b077aed3SPierre Pronchery{- $OpenSSL::safe::opt_provider_item -}
92*b077aed3SPierre Pronchery
93*b077aed3SPierre Pronchery=item B<-->
94*b077aed3SPierre Pronchery
95*b077aed3SPierre ProncheryIndicates the last option. All arguments following this are assumed to be
96*b077aed3SPierre Proncherycertificate files. This is useful if the first certificate filename begins
97*b077aed3SPierre Proncherywith a B<->.
98*b077aed3SPierre Pronchery
99*b077aed3SPierre Pronchery=item I<certificate> ...
100*b077aed3SPierre Pronchery
101*b077aed3SPierre ProncheryOne or more target certificates to verify, one per file. If no certificates are
102*b077aed3SPierre Proncherygiven, this command will attempt to read a single certificate from standard
103*b077aed3SPierre Proncheryinput.
104*b077aed3SPierre Pronchery
105*b077aed3SPierre Pronchery=back
106*b077aed3SPierre Pronchery
107*b077aed3SPierre Pronchery=head1 DIAGNOSTICS
108*b077aed3SPierre Pronchery
109*b077aed3SPierre ProncheryWhen a verify operation fails the output messages can be somewhat cryptic. The
110*b077aed3SPierre Proncherygeneral form of the error message is:
111*b077aed3SPierre Pronchery
112*b077aed3SPierre Pronchery server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
113*b077aed3SPierre Pronchery error 24 at 1 depth lookup:invalid CA certificate
114*b077aed3SPierre Pronchery
115*b077aed3SPierre ProncheryThe first line contains the name of the certificate being verified followed by
116*b077aed3SPierre Proncherythe subject name of the certificate. The second line contains the error number
117*b077aed3SPierre Proncheryand the depth. The depth is number of the certificate being verified when a
118*b077aed3SPierre Proncheryproblem was detected starting with zero for the target ("leaf") certificate
119*b077aed3SPierre Proncheryitself then 1 for the CA that signed the target certificate and so on.
120*b077aed3SPierre ProncheryFinally a textual version of the error number is presented.
121*b077aed3SPierre Pronchery
122*b077aed3SPierre ProncheryA list of the error codes and messages can be found in
123*b077aed3SPierre ProncheryL<X509_STORE_CTX_get_error(3)>; the full list is defined in the header file
124*b077aed3SPierre ProncheryF<< <openssl/x509_vfy.h> >>.
125*b077aed3SPierre Pronchery
126*b077aed3SPierre ProncheryThis command ignores many errors, in order to allow all the problems with a
127*b077aed3SPierre Proncherycertificate chain to be determined.
128*b077aed3SPierre Pronchery
129*b077aed3SPierre Pronchery=head1 SEE ALSO
130*b077aed3SPierre Pronchery
131*b077aed3SPierre ProncheryL<openssl-verification-options(1)>,
132*b077aed3SPierre ProncheryL<openssl-x509(1)>,
133*b077aed3SPierre ProncheryL<ossl_store-file(7)>
134*b077aed3SPierre Pronchery
135*b077aed3SPierre Pronchery=head1 HISTORY
136*b077aed3SPierre Pronchery
137*b077aed3SPierre ProncheryThe B<-show_chain> option was added in OpenSSL 1.1.0.
138*b077aed3SPierre Pronchery
139*b077aed3SPierre ProncheryThe B<-engine option> was deprecated in OpenSSL 3.0.
140*b077aed3SPierre Pronchery
141*b077aed3SPierre Pronchery=head1 COPYRIGHT
142*b077aed3SPierre Pronchery
143*b077aed3SPierre ProncheryCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
144*b077aed3SPierre Pronchery
145*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
146*b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
147*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
148*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
149*b077aed3SPierre Pronchery
150*b077aed3SPierre Pronchery=cut
151