]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/usr.bin/openssl/man/verify.1
Update bmake to version 20180919
[FreeBSD/FreeBSD.git] / secure / usr.bin / openssl / man / verify.1
1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "VERIFY 1"
132 .TH VERIFY 1 "2018-11-20" "1.1.1a" "OpenSSL"
133 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 openssl\-verify, verify \- Utility to verify certificates
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 \&\fBopenssl\fR \fBverify\fR
142 [\fB\-help\fR]
143 [\fB\-CAfile file\fR]
144 [\fB\-CApath directory\fR]
145 [\fB\-no\-CAfile\fR]
146 [\fB\-no\-CApath\fR]
147 [\fB\-allow_proxy_certs\fR]
148 [\fB\-attime timestamp\fR]
149 [\fB\-check_ss_sig\fR]
150 [\fB\-CRLfile file\fR]
151 [\fB\-crl_download\fR]
152 [\fB\-crl_check\fR]
153 [\fB\-crl_check_all\fR]
154 [\fB\-engine id\fR]
155 [\fB\-explicit_policy\fR]
156 [\fB\-extended_crl\fR]
157 [\fB\-ignore_critical\fR]
158 [\fB\-inhibit_any\fR]
159 [\fB\-inhibit_map\fR]
160 [\fB\-nameopt option\fR]
161 [\fB\-no_check_time\fR]
162 [\fB\-partial_chain\fR]
163 [\fB\-policy arg\fR]
164 [\fB\-policy_check\fR]
165 [\fB\-policy_print\fR]
166 [\fB\-purpose purpose\fR]
167 [\fB\-suiteB_128\fR]
168 [\fB\-suiteB_128_only\fR]
169 [\fB\-suiteB_192\fR]
170 [\fB\-trusted_first\fR]
171 [\fB\-no_alt_chains\fR]
172 [\fB\-untrusted file\fR]
173 [\fB\-trusted file\fR]
174 [\fB\-use_deltas\fR]
175 [\fB\-verbose\fR]
176 [\fB\-auth_level level\fR]
177 [\fB\-verify_depth num\fR]
178 [\fB\-verify_email email\fR]
179 [\fB\-verify_hostname hostname\fR]
180 [\fB\-verify_ip ip\fR]
181 [\fB\-verify_name name\fR]
182 [\fB\-x509_strict\fR]
183 [\fB\-show_chain\fR]
184 [\fB\-\fR]
185 [certificates]
186 .SH "DESCRIPTION"
187 .IX Header "DESCRIPTION"
188 The \fBverify\fR command verifies certificate chains.
189 .SH "OPTIONS"
190 .IX Header "OPTIONS"
191 .IP "\fB\-help\fR" 4
192 .IX Item "-help"
193 Print out a usage message.
194 .IP "\fB\-CAfile file\fR" 4
195 .IX Item "-CAfile file"
196 A \fBfile\fR of trusted certificates.
197 The file should contain one or more certificates in \s-1PEM\s0 format.
198 .IP "\fB\-CApath directory\fR" 4
199 .IX Item "-CApath directory"
200 A directory of trusted certificates. The certificates should have names
201 of the form: hash.0 or have symbolic links to them of this
202 form (\*(L"hash\*(R" is the hashed certificate subject name: see the \fB\-hash\fR option
203 of the \fBx509\fR utility). Under Unix the \fBc_rehash\fR script will automatically
204 create symbolic links to a directory of certificates.
205 .IP "\fB\-no\-CAfile\fR" 4
206 .IX Item "-no-CAfile"
207 Do not load the trusted \s-1CA\s0 certificates from the default file location.
208 .IP "\fB\-no\-CApath\fR" 4
209 .IX Item "-no-CApath"
210 Do not load the trusted \s-1CA\s0 certificates from the default directory location.
211 .IP "\fB\-allow_proxy_certs\fR" 4
212 .IX Item "-allow_proxy_certs"
213 Allow the verification of proxy certificates.
214 .IP "\fB\-attime timestamp\fR" 4
215 .IX Item "-attime timestamp"
216 Perform validation checks using time specified by \fBtimestamp\fR and not
217 current system time. \fBtimestamp\fR is the number of seconds since
218 01.01.1970 (\s-1UNIX\s0 time).
219 .IP "\fB\-check_ss_sig\fR" 4
220 .IX Item "-check_ss_sig"
221 Verify the signature on the self-signed root \s-1CA.\s0 This is disabled by default
222 because it doesn't add any security.
223 .IP "\fB\-CRLfile file\fR" 4
224 .IX Item "-CRLfile file"
225 The \fBfile\fR should contain one or more CRLs in \s-1PEM\s0 format.
226 This option can be specified more than once to include CRLs from multiple
227 \&\fBfiles\fR.
228 .IP "\fB\-crl_download\fR" 4
229 .IX Item "-crl_download"
230 Attempt to download \s-1CRL\s0 information for this certificate.
231 .IP "\fB\-crl_check\fR" 4
232 .IX Item "-crl_check"
233 Checks end entity certificate validity by attempting to look up a valid \s-1CRL.\s0
234 If a valid \s-1CRL\s0 cannot be found an error occurs.
235 .IP "\fB\-crl_check_all\fR" 4
236 .IX Item "-crl_check_all"
237 Checks the validity of \fBall\fR certificates in the chain by attempting
238 to look up valid CRLs.
239 .IP "\fB\-engine id\fR" 4
240 .IX Item "-engine id"
241 Specifying an engine \fBid\fR will cause \fIverify\fR\|(1) to attempt to load the
242 specified engine.
243 The engine will then be set as the default for all its supported algorithms.
244 If you want to load certificates or CRLs that require engine support via any of
245 the \fB\-trusted\fR, \fB\-untrusted\fR or \fB\-CRLfile\fR options, the \fB\-engine\fR option
246 must be specified before those options.
247 .IP "\fB\-explicit_policy\fR" 4
248 .IX Item "-explicit_policy"
249 Set policy variable require-explicit-policy (see \s-1RFC5280\s0).
250 .IP "\fB\-extended_crl\fR" 4
251 .IX Item "-extended_crl"
252 Enable extended \s-1CRL\s0 features such as indirect CRLs and alternate \s-1CRL\s0
253 signing keys.
254 .IP "\fB\-ignore_critical\fR" 4
255 .IX Item "-ignore_critical"
256 Normally if an unhandled critical extension is present which is not
257 supported by OpenSSL the certificate is rejected (as required by \s-1RFC5280\s0).
258 If this option is set critical extensions are ignored.
259 .IP "\fB\-inhibit_any\fR" 4
260 .IX Item "-inhibit_any"
261 Set policy variable inhibit-any-policy (see \s-1RFC5280\s0).
262 .IP "\fB\-inhibit_map\fR" 4
263 .IX Item "-inhibit_map"
264 Set policy variable inhibit-policy-mapping (see \s-1RFC5280\s0).
265 .IP "\fB\-nameopt option\fR" 4
266 .IX Item "-nameopt option"
267 Option which determines how the subject or issuer names are displayed. The
268 \&\fBoption\fR argument can be a single option or multiple options separated by
269 commas.  Alternatively the \fB\-nameopt\fR switch may be used more than once to
270 set multiple options. See the \fIx509\fR\|(1) manual page for details.
271 .IP "\fB\-no_check_time\fR" 4
272 .IX Item "-no_check_time"
273 This option suppresses checking the validity period of certificates and CRLs
274 against the current time. If option \fB\-attime timestamp\fR is used to specify
275 a verification time, the check is not suppressed.
276 .IP "\fB\-partial_chain\fR" 4
277 .IX Item "-partial_chain"
278 Allow verification to succeed even if a \fIcomplete\fR chain cannot be built to a
279 self-signed trust-anchor, provided it is possible to construct a chain to a
280 trusted certificate that might not be self-signed.
281 .IP "\fB\-policy arg\fR" 4
282 .IX Item "-policy arg"
283 Enable policy processing and add \fBarg\fR to the user-initial-policy-set (see
284 \&\s-1RFC5280\s0). The policy \fBarg\fR can be an object name an \s-1OID\s0 in numeric form.
285 This argument can appear more than once.
286 .IP "\fB\-policy_check\fR" 4
287 .IX Item "-policy_check"
288 Enables certificate policy processing.
289 .IP "\fB\-policy_print\fR" 4
290 .IX Item "-policy_print"
291 Print out diagnostics related to policy processing.
292 .IP "\fB\-purpose purpose\fR" 4
293 .IX Item "-purpose purpose"
294 The intended use for the certificate. If this option is not specified,
295 \&\fBverify\fR will not consider certificate purpose during chain verification.
296 Currently accepted uses are \fBsslclient\fR, \fBsslserver\fR, \fBnssslserver\fR,
297 \&\fBsmimesign\fR, \fBsmimeencrypt\fR. See the \fB\s-1VERIFY OPERATION\s0\fR section for more
298 information.
299 .IP "\fB\-suiteB_128_only\fR, \fB\-suiteB_128\fR, \fB\-suiteB_192\fR" 4
300 .IX Item "-suiteB_128_only, -suiteB_128, -suiteB_192"
301 Enable the Suite B mode operation at 128 bit Level of Security, 128 bit or
302 192 bit, or only 192 bit Level of Security respectively.
303 See \s-1RFC6460\s0 for details. In particular the supported signature algorithms are
304 reduced to support only \s-1ECDSA\s0 and \s-1SHA256\s0 or \s-1SHA384\s0 and only the elliptic curves
305 P\-256 and P\-384.
306 .IP "\fB\-trusted_first\fR" 4
307 .IX Item "-trusted_first"
308 When constructing the certificate chain, use the trusted certificates specified
309 via \fB\-CAfile\fR, \fB\-CApath\fR or \fB\-trusted\fR before any certificates specified via
310 \&\fB\-untrusted\fR.
311 This can be useful in environments with Bridge or Cross-Certified CAs.
312 As of OpenSSL 1.1.0 this option is on by default and cannot be disabled.
313 .IP "\fB\-no_alt_chains\fR" 4
314 .IX Item "-no_alt_chains"
315 By default, unless \fB\-trusted_first\fR is specified, when building a certificate
316 chain, if the first certificate chain found is not trusted, then OpenSSL will
317 attempt to replace untrusted issuer certificates with certificates from the
318 trust store to see if an alternative chain can be found that is trusted.
319 As of OpenSSL 1.1.0, with \fB\-trusted_first\fR always on, this option has no
320 effect.
321 .IP "\fB\-untrusted file\fR" 4
322 .IX Item "-untrusted file"
323 A \fBfile\fR of additional untrusted certificates (intermediate issuer CAs) used
324 to construct a certificate chain from the subject certificate to a trust-anchor.
325 The \fBfile\fR should contain one or more certificates in \s-1PEM\s0 format.
326 This option can be specified more than once to include untrusted certificates
327 from multiple \fBfiles\fR.
328 .IP "\fB\-trusted file\fR" 4
329 .IX Item "-trusted file"
330 A \fBfile\fR of trusted certificates, which must be self-signed, unless the
331 \&\fB\-partial_chain\fR option is specified.
332 The \fBfile\fR contains one or more certificates in \s-1PEM\s0 format.
333 With this option, no additional (e.g., default) certificate lists are
334 consulted.
335 That is, the only trust-anchors are those listed in \fBfile\fR.
336 This option can be specified more than once to include trusted certificates
337 from multiple \fBfiles\fR.
338 This option implies the \fB\-no\-CAfile\fR and \fB\-no\-CApath\fR options.
339 This option cannot be used in combination with either of the \fB\-CAfile\fR or
340 \&\fB\-CApath\fR options.
341 .IP "\fB\-use_deltas\fR" 4
342 .IX Item "-use_deltas"
343 Enable support for delta CRLs.
344 .IP "\fB\-verbose\fR" 4
345 .IX Item "-verbose"
346 Print extra information about the operations being performed.
347 .IP "\fB\-auth_level level\fR" 4
348 .IX Item "-auth_level level"
349 Set the certificate chain authentication security level to \fBlevel\fR.
350 The authentication security level determines the acceptable signature and
351 public key strength when verifying certificate chains.
352 For a certificate chain to validate, the public keys of all the certificates
353 must meet the specified security \fBlevel\fR.
354 The signature algorithm security level is enforced for all the certificates in
355 the chain except for the chain's \fItrust anchor\fR, which is either directly
356 trusted or validated by means other than its signature.
357 See \fISSL_CTX_set_security_level\fR\|(3) for the definitions of the available
358 levels.
359 The default security level is \-1, or \*(L"not set\*(R".
360 At security level 0 or lower all algorithms are acceptable.
361 Security level 1 requires at least 80\-bit\-equivalent security and is broadly
362 interoperable, though it will, for example, reject \s-1MD5\s0 signatures or \s-1RSA\s0 keys
363 shorter than 1024 bits.
364 .IP "\fB\-verify_depth num\fR" 4
365 .IX Item "-verify_depth num"
366 Limit the certificate chain to \fBnum\fR intermediate \s-1CA\s0 certificates.
367 A maximal depth chain can have up to \fBnum+2\fR certificates, since neither the
368 end-entity certificate nor the trust-anchor certificate count against the
369 \&\fB\-verify_depth\fR limit.
370 .IP "\fB\-verify_email email\fR" 4
371 .IX Item "-verify_email email"
372 Verify if the \fBemail\fR matches the email address in Subject Alternative Name or
373 the email in the subject Distinguished Name.
374 .IP "\fB\-verify_hostname hostname\fR" 4
375 .IX Item "-verify_hostname hostname"
376 Verify if the \fBhostname\fR matches \s-1DNS\s0 name in Subject Alternative Name or
377 Common Name in the subject certificate.
378 .IP "\fB\-verify_ip ip\fR" 4
379 .IX Item "-verify_ip ip"
380 Verify if the \fBip\fR matches the \s-1IP\s0 address in Subject Alternative Name of
381 the subject certificate.
382 .IP "\fB\-verify_name name\fR" 4
383 .IX Item "-verify_name name"
384 Use default verification policies like trust model and required certificate
385 policies identified by \fBname\fR.
386 The trust model determines which auxiliary trust or reject OIDs are applicable
387 to verifying the given certificate chain.
388 See the \fB\-addtrust\fR and \fB\-addreject\fR options of the \fIx509\fR\|(1) command-line
389 utility.
390 Supported policy names include: \fBdefault\fR, \fBpkcs7\fR, \fBsmime_sign\fR,
391 \&\fBssl_client\fR, \fBssl_server\fR.
392 These mimics the combinations of purpose and trust settings used in \s-1SSL, CMS\s0
393 and S/MIME.
394 As of OpenSSL 1.1.0, the trust model is inferred from the purpose when not
395 specified, so the \fB\-verify_name\fR options are functionally equivalent to the
396 corresponding \fB\-purpose\fR settings.
397 .IP "\fB\-x509_strict\fR" 4
398 .IX Item "-x509_strict"
399 For strict X.509 compliance, disable non-compliant workarounds for broken
400 certificates.
401 .IP "\fB\-show_chain\fR" 4
402 .IX Item "-show_chain"
403 Display information about the certificate chain that has been built (if
404 successful). Certificates in the chain that came from the untrusted list will be
405 flagged as \*(L"untrusted\*(R".
406 .IP "\fB\-\fR" 4
407 .IX Item "-"
408 Indicates the last option. All arguments following this are assumed to be
409 certificate files. This is useful if the first certificate filename begins
410 with a \fB\-\fR.
411 .IP "\fBcertificates\fR" 4
412 .IX Item "certificates"
413 One or more certificates to verify. If no certificates are given, \fBverify\fR
414 will attempt to read a certificate from standard input. Certificates must be
415 in \s-1PEM\s0 format.
416 .SH "VERIFY OPERATION"
417 .IX Header "VERIFY OPERATION"
418 The \fBverify\fR program uses the same functions as the internal \s-1SSL\s0 and S/MIME
419 verification, therefore this description applies to these verify operations
420 too.
421 .PP
422 There is one crucial difference between the verify operations performed
423 by the \fBverify\fR program: wherever possible an attempt is made to continue
424 after an error whereas normally the verify operation would halt on the
425 first error. This allows all the problems with a certificate chain to be
426 determined.
427 .PP
428 The verify operation consists of a number of separate steps.
429 .PP
430 Firstly a certificate chain is built up starting from the supplied certificate
431 and ending in the root \s-1CA.\s0
432 It is an error if the whole chain cannot be built up.
433 The chain is built up by looking up the issuers certificate of the current
434 certificate.
435 If a certificate is found which is its own issuer it is assumed to be the root
436 \&\s-1CA.\s0
437 .PP
438 The process of 'looking up the issuers certificate' itself involves a number of
439 steps.
440 After all certificates whose subject name matches the issuer name of the current
441 certificate are subject to further tests.
442 The relevant authority key identifier components of the current certificate (if
443 present) must match the subject key identifier (if present) and issuer and
444 serial number of the candidate issuer, in addition the keyUsage extension of
445 the candidate issuer (if present) must permit certificate signing.
446 .PP
447 The lookup first looks in the list of untrusted certificates and if no match
448 is found the remaining lookups are from the trusted certificates. The root \s-1CA\s0
449 is always looked up in the trusted certificate list: if the certificate to
450 verify is a root certificate then an exact match must be found in the trusted
451 list.
452 .PP
453 The second operation is to check every untrusted certificate's extensions for
454 consistency with the supplied purpose. If the \fB\-purpose\fR option is not included
455 then no checks are done. The supplied or \*(L"leaf\*(R" certificate must have extensions
456 compatible with the supplied purpose and all other certificates must also be valid
457 \&\s-1CA\s0 certificates. The precise extensions required are described in more detail in
458 the \fB\s-1CERTIFICATE EXTENSIONS\s0\fR section of the \fBx509\fR utility.
459 .PP
460 The third operation is to check the trust settings on the root \s-1CA.\s0 The root \s-1CA\s0
461 should be trusted for the supplied purpose.
462 For compatibility with previous versions of OpenSSL, a certificate with no
463 trust settings is considered to be valid for all purposes.
464 .PP
465 The final operation is to check the validity of the certificate chain. The validity
466 period is checked against the current system time and the notBefore and notAfter
467 dates in the certificate. The certificate signatures are also checked at this
468 point.
469 .PP
470 If all operations complete successfully then certificate is considered valid. If
471 any operation fails then the certificate is not valid.
472 .SH "DIAGNOSTICS"
473 .IX Header "DIAGNOSTICS"
474 When a verify operation fails the output messages can be somewhat cryptic. The
475 general form of the error message is:
476 .PP
477 .Vb 2
478 \& server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
479 \& error 24 at 1 depth lookup:invalid CA certificate
480 .Ve
481 .PP
482 The first line contains the name of the certificate being verified followed by
483 the subject name of the certificate. The second line contains the error number
484 and the depth. The depth is number of the certificate being verified when a
485 problem was detected starting with zero for the certificate being verified itself
486 then 1 for the \s-1CA\s0 that signed the certificate and so on. Finally a text version
487 of the error number is presented.
488 .PP
489 A partial list of the error codes and messages is shown below, this also
490 includes the name of the error code as defined in the header file x509_vfy.h
491 Some of the error codes are defined but never returned: these are described
492 as \*(L"unused\*(R".
493 .IP "\fBX509_V_OK\fR" 4
494 .IX Item "X509_V_OK"
495 The operation was successful.
496 .IP "\fBX509_V_ERR_UNSPECIFIED\fR" 4
497 .IX Item "X509_V_ERR_UNSPECIFIED"
498 Unspecified error; should not happen.
499 .IP "\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT\fR" 4
500 .IX Item "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT"
501 The issuer certificate of a looked up certificate could not be found. This
502 normally means the list of trusted certificates is not complete.
503 .IP "\fBX509_V_ERR_UNABLE_TO_GET_CRL\fR" 4
504 .IX Item "X509_V_ERR_UNABLE_TO_GET_CRL"
505 The \s-1CRL\s0 of a certificate could not be found.
506 .IP "\fBX509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE\fR" 4
507 .IX Item "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE"
508 The certificate signature could not be decrypted. This means that the
509 actual signature value could not be determined rather than it not matching
510 the expected value, this is only meaningful for \s-1RSA\s0 keys.
511 .IP "\fBX509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE\fR" 4
512 .IX Item "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE"
513 The \s-1CRL\s0 signature could not be decrypted: this means that the actual
514 signature value could not be determined rather than it not matching the
515 expected value. Unused.
516 .IP "\fBX509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY\fR" 4
517 .IX Item "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY"
518 The public key in the certificate SubjectPublicKeyInfo could not be read.
519 .IP "\fBX509_V_ERR_CERT_SIGNATURE_FAILURE\fR" 4
520 .IX Item "X509_V_ERR_CERT_SIGNATURE_FAILURE"
521 The signature of the certificate is invalid.
522 .IP "\fBX509_V_ERR_CRL_SIGNATURE_FAILURE\fR" 4
523 .IX Item "X509_V_ERR_CRL_SIGNATURE_FAILURE"
524 The signature of the certificate is invalid.
525 .IP "\fBX509_V_ERR_CERT_NOT_YET_VALID\fR" 4
526 .IX Item "X509_V_ERR_CERT_NOT_YET_VALID"
527 The certificate is not yet valid: the notBefore date is after the
528 current time.
529 .IP "\fBX509_V_ERR_CERT_HAS_EXPIRED\fR" 4
530 .IX Item "X509_V_ERR_CERT_HAS_EXPIRED"
531 The certificate has expired: that is the notAfter date is before the
532 current time.
533 .IP "\fBX509_V_ERR_CRL_NOT_YET_VALID\fR" 4
534 .IX Item "X509_V_ERR_CRL_NOT_YET_VALID"
535 The \s-1CRL\s0 is not yet valid.
536 .IP "\fBX509_V_ERR_CRL_HAS_EXPIRED\fR" 4
537 .IX Item "X509_V_ERR_CRL_HAS_EXPIRED"
538 The \s-1CRL\s0 has expired.
539 .IP "\fBX509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD\fR" 4
540 .IX Item "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD"
541 The certificate notBefore field contains an invalid time.
542 .IP "\fBX509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD\fR" 4
543 .IX Item "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD"
544 The certificate notAfter field contains an invalid time.
545 .IP "\fBX509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD\fR" 4
546 .IX Item "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD"
547 The \s-1CRL\s0 lastUpdate field contains an invalid time.
548 .IP "\fBX509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD\fR" 4
549 .IX Item "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD"
550 The \s-1CRL\s0 nextUpdate field contains an invalid time.
551 .IP "\fBX509_V_ERR_OUT_OF_MEM\fR" 4
552 .IX Item "X509_V_ERR_OUT_OF_MEM"
553 An error occurred trying to allocate memory. This should never happen.
554 .IP "\fBX509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT\fR" 4
555 .IX Item "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT"
556 The passed certificate is self-signed and the same certificate cannot
557 be found in the list of trusted certificates.
558 .IP "\fBX509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN\fR" 4
559 .IX Item "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN"
560 The certificate chain could be built up using the untrusted certificates
561 but the root could not be found locally.
562 .IP "\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY\fR" 4
563 .IX Item "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY"
564 The issuer certificate could not be found: this occurs if the issuer
565 certificate of an untrusted certificate cannot be found.
566 .IP "\fBX509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE\fR" 4
567 .IX Item "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE"
568 No signatures could be verified because the chain contains only one
569 certificate and it is not self signed.
570 .IP "\fBX509_V_ERR_CERT_CHAIN_TOO_LONG\fR" 4
571 .IX Item "X509_V_ERR_CERT_CHAIN_TOO_LONG"
572 The certificate chain length is greater than the supplied maximum
573 depth. Unused.
574 .IP "\fBX509_V_ERR_CERT_REVOKED\fR" 4
575 .IX Item "X509_V_ERR_CERT_REVOKED"
576 The certificate has been revoked.
577 .IP "\fBX509_V_ERR_INVALID_CA\fR" 4
578 .IX Item "X509_V_ERR_INVALID_CA"
579 A \s-1CA\s0 certificate is invalid. Either it is not a \s-1CA\s0 or its extensions
580 are not consistent with the supplied purpose.
581 .IP "\fBX509_V_ERR_PATH_LENGTH_EXCEEDED\fR" 4
582 .IX Item "X509_V_ERR_PATH_LENGTH_EXCEEDED"
583 The basicConstraints pathlength parameter has been exceeded.
584 .IP "\fBX509_V_ERR_INVALID_PURPOSE\fR" 4
585 .IX Item "X509_V_ERR_INVALID_PURPOSE"
586 The supplied certificate cannot be used for the specified purpose.
587 .IP "\fBX509_V_ERR_CERT_UNTRUSTED\fR" 4
588 .IX Item "X509_V_ERR_CERT_UNTRUSTED"
589 The root \s-1CA\s0 is not marked as trusted for the specified purpose.
590 .IP "\fBX509_V_ERR_CERT_REJECTED\fR" 4
591 .IX Item "X509_V_ERR_CERT_REJECTED"
592 The root \s-1CA\s0 is marked to reject the specified purpose.
593 .IP "\fBX509_V_ERR_SUBJECT_ISSUER_MISMATCH\fR" 4
594 .IX Item "X509_V_ERR_SUBJECT_ISSUER_MISMATCH"
595 Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
596 \&\fB\-issuer_checks\fR option.
597 .IP "\fBX509_V_ERR_AKID_SKID_MISMATCH\fR" 4
598 .IX Item "X509_V_ERR_AKID_SKID_MISMATCH"
599 Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
600 \&\fB\-issuer_checks\fR option.
601 .IP "\fBX509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH\fR" 4
602 .IX Item "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH"
603 Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
604 \&\fB\-issuer_checks\fR option.
605 .IP "\fBX509_V_ERR_KEYUSAGE_NO_CERTSIGN\fR" 4
606 .IX Item "X509_V_ERR_KEYUSAGE_NO_CERTSIGN"
607 Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
608 \&\fB\-issuer_checks\fR option.
609 .IP "\fBX509_V_ERR_UNABLE_TO_GET_CRL_ISSUER\fR" 4
610 .IX Item "X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER"
611 Unable to get \s-1CRL\s0 issuer certificate.
612 .IP "\fBX509_V_ERR_UNHANDLED_CRITICAL_EXTENSION\fR" 4
613 .IX Item "X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION"
614 Unhandled critical extension.
615 .IP "\fBX509_V_ERR_KEYUSAGE_NO_CRL_SIGN\fR" 4
616 .IX Item "X509_V_ERR_KEYUSAGE_NO_CRL_SIGN"
617 Key usage does not include \s-1CRL\s0 signing.
618 .IP "\fBX509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION\fR" 4
619 .IX Item "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION"
620 Unhandled critical \s-1CRL\s0 extension.
621 .IP "\fBX509_V_ERR_INVALID_NON_CA\fR" 4
622 .IX Item "X509_V_ERR_INVALID_NON_CA"
623 Invalid non-CA certificate has \s-1CA\s0 markings.
624 .IP "\fBX509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED\fR" 4
625 .IX Item "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED"
626 Proxy path length constraint exceeded.
627 .IP "\fBX509_V_ERR_PROXY_SUBJECT_INVALID\fR" 4
628 .IX Item "X509_V_ERR_PROXY_SUBJECT_INVALID"
629 Proxy certificate subject is invalid.  It \s-1MUST\s0 be the same as the issuer
630 with a single \s-1CN\s0 component added.
631 .IP "\fBX509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE\fR" 4
632 .IX Item "X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE"
633 Key usage does not include digital signature.
634 .IP "\fBX509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED\fR" 4
635 .IX Item "X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED"
636 Proxy certificates not allowed, please use \fB\-allow_proxy_certs\fR.
637 .IP "\fBX509_V_ERR_INVALID_EXTENSION\fR" 4
638 .IX Item "X509_V_ERR_INVALID_EXTENSION"
639 Invalid or inconsistent certificate extension.
640 .IP "\fBX509_V_ERR_INVALID_POLICY_EXTENSION\fR" 4
641 .IX Item "X509_V_ERR_INVALID_POLICY_EXTENSION"
642 Invalid or inconsistent certificate policy extension.
643 .IP "\fBX509_V_ERR_NO_EXPLICIT_POLICY\fR" 4
644 .IX Item "X509_V_ERR_NO_EXPLICIT_POLICY"
645 No explicit policy.
646 .IP "\fBX509_V_ERR_DIFFERENT_CRL_SCOPE\fR" 4
647 .IX Item "X509_V_ERR_DIFFERENT_CRL_SCOPE"
648 Different \s-1CRL\s0 scope.
649 .IP "\fBX509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE\fR" 4
650 .IX Item "X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE"
651 Unsupported extension feature.
652 .IP "\fBX509_V_ERR_UNNESTED_RESOURCE\fR" 4
653 .IX Item "X509_V_ERR_UNNESTED_RESOURCE"
654 \&\s-1RFC 3779\s0 resource not subset of parent's resources.
655 .IP "\fBX509_V_ERR_PERMITTED_VIOLATION\fR" 4
656 .IX Item "X509_V_ERR_PERMITTED_VIOLATION"
657 Permitted subtree violation.
658 .IP "\fBX509_V_ERR_EXCLUDED_VIOLATION\fR" 4
659 .IX Item "X509_V_ERR_EXCLUDED_VIOLATION"
660 Excluded subtree violation.
661 .IP "\fBX509_V_ERR_SUBTREE_MINMAX\fR" 4
662 .IX Item "X509_V_ERR_SUBTREE_MINMAX"
663 Name constraints minimum and maximum not supported.
664 .IP "\fBX509_V_ERR_APPLICATION_VERIFICATION\fR" 4
665 .IX Item "X509_V_ERR_APPLICATION_VERIFICATION"
666 Application verification failure. Unused.
667 .IP "\fBX509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE\fR" 4
668 .IX Item "X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE"
669 Unsupported name constraint type.
670 .IP "\fBX509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX\fR" 4
671 .IX Item "X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX"
672 Unsupported or invalid name constraint syntax.
673 .IP "\fBX509_V_ERR_UNSUPPORTED_NAME_SYNTAX\fR" 4
674 .IX Item "X509_V_ERR_UNSUPPORTED_NAME_SYNTAX"
675 Unsupported or invalid name syntax.
676 .IP "\fBX509_V_ERR_CRL_PATH_VALIDATION_ERROR\fR" 4
677 .IX Item "X509_V_ERR_CRL_PATH_VALIDATION_ERROR"
678 \&\s-1CRL\s0 path validation error.
679 .IP "\fBX509_V_ERR_PATH_LOOP\fR" 4
680 .IX Item "X509_V_ERR_PATH_LOOP"
681 Path loop.
682 .IP "\fBX509_V_ERR_SUITE_B_INVALID_VERSION\fR" 4
683 .IX Item "X509_V_ERR_SUITE_B_INVALID_VERSION"
684 Suite B: certificate version invalid.
685 .IP "\fBX509_V_ERR_SUITE_B_INVALID_ALGORITHM\fR" 4
686 .IX Item "X509_V_ERR_SUITE_B_INVALID_ALGORITHM"
687 Suite B: invalid public key algorithm.
688 .IP "\fBX509_V_ERR_SUITE_B_INVALID_CURVE\fR" 4
689 .IX Item "X509_V_ERR_SUITE_B_INVALID_CURVE"
690 Suite B: invalid \s-1ECC\s0 curve.
691 .IP "\fBX509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM\fR" 4
692 .IX Item "X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM"
693 Suite B: invalid signature algorithm.
694 .IP "\fBX509_V_ERR_SUITE_B_LOS_NOT_ALLOWED\fR" 4
695 .IX Item "X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED"
696 Suite B: curve not allowed for this \s-1LOS.\s0
697 .IP "\fBX509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256\fR" 4
698 .IX Item "X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256"
699 Suite B: cannot sign P\-384 with P\-256.
700 .IP "\fBX509_V_ERR_HOSTNAME_MISMATCH\fR" 4
701 .IX Item "X509_V_ERR_HOSTNAME_MISMATCH"
702 Hostname mismatch.
703 .IP "\fBX509_V_ERR_EMAIL_MISMATCH\fR" 4
704 .IX Item "X509_V_ERR_EMAIL_MISMATCH"
705 Email address mismatch.
706 .IP "\fBX509_V_ERR_IP_ADDRESS_MISMATCH\fR" 4
707 .IX Item "X509_V_ERR_IP_ADDRESS_MISMATCH"
708 \&\s-1IP\s0 address mismatch.
709 .IP "\fBX509_V_ERR_DANE_NO_MATCH\fR" 4
710 .IX Item "X509_V_ERR_DANE_NO_MATCH"
711 \&\s-1DANE TLSA\s0 authentication is enabled, but no \s-1TLSA\s0 records matched the
712 certificate chain.
713 This error is only possible in \fIs_client\fR\|(1).
714 .IP "\fBX509_V_ERR_EE_KEY_TOO_SMALL\fR" 4
715 .IX Item "X509_V_ERR_EE_KEY_TOO_SMALL"
716 \&\s-1EE\s0 certificate key too weak.
717 .IP "\fBX509_ERR_CA_KEY_TOO_SMALL\fR" 4
718 .IX Item "X509_ERR_CA_KEY_TOO_SMALL"
719 \&\s-1CA\s0 certificate key too weak.
720 .IP "\fBX509_ERR_CA_MD_TOO_WEAK\fR" 4
721 .IX Item "X509_ERR_CA_MD_TOO_WEAK"
722 \&\s-1CA\s0 signature digest algorithm too weak.
723 .IP "\fBX509_V_ERR_INVALID_CALL\fR" 4
724 .IX Item "X509_V_ERR_INVALID_CALL"
725 nvalid certificate verification context.
726 .IP "\fBX509_V_ERR_STORE_LOOKUP\fR" 4
727 .IX Item "X509_V_ERR_STORE_LOOKUP"
728 Issuer certificate lookup error.
729 .IP "\fBX509_V_ERR_NO_VALID_SCTS\fR" 4
730 .IX Item "X509_V_ERR_NO_VALID_SCTS"
731 Certificate Transparency required, but no valid SCTs found.
732 .IP "\fBX509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION\fR" 4
733 .IX Item "X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION"
734 Proxy subject name violation.
735 .IP "\fBX509_V_ERR_OCSP_VERIFY_NEEDED\fR" 4
736 .IX Item "X509_V_ERR_OCSP_VERIFY_NEEDED"
737 Returned by the verify callback to indicate an \s-1OCSP\s0 verification is needed.
738 .IP "\fBX509_V_ERR_OCSP_VERIFY_FAILED\fR" 4
739 .IX Item "X509_V_ERR_OCSP_VERIFY_FAILED"
740 Returned by the verify callback to indicate \s-1OCSP\s0 verification failed.
741 .IP "\fBX509_V_ERR_OCSP_CERT_UNKNOWN\fR" 4
742 .IX Item "X509_V_ERR_OCSP_CERT_UNKNOWN"
743 Returned by the verify callback to indicate that the certificate is not recognized
744 by the \s-1OCSP\s0 responder.
745 .SH "BUGS"
746 .IX Header "BUGS"
747 Although the issuer checks are a considerable improvement over the old
748 technique they still suffer from limitations in the underlying X509_LOOKUP
749 \&\s-1API.\s0 One consequence of this is that trusted certificates with matching
750 subject name must either appear in a file (as specified by the \fB\-CAfile\fR
751 option) or a directory (as specified by \fB\-CApath\fR). If they occur in
752 both then only the certificates in the file will be recognised.
753 .PP
754 Previous versions of OpenSSL assume certificates with matching subject
755 name are identical and mishandled them.
756 .PP
757 Previous versions of this documentation swapped the meaning of the
758 \&\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT\fR and
759 \&\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY\fR error codes.
760 .SH "SEE ALSO"
761 .IX Header "SEE ALSO"
762 \&\fIx509\fR\|(1)
763 .SH "HISTORY"
764 .IX Header "HISTORY"
765 The \fB\-show_chain\fR option was first added to OpenSSL 1.1.0.
766 .PP
767 The \fB\-issuer_checks\fR option is deprecated as of OpenSSL 1.1.0 and
768 is silently ignored.
769 .SH "COPYRIGHT"
770 .IX Header "COPYRIGHT"
771 Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
772 .PP
773 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
774 this file except in compliance with the License.  You can obtain a copy
775 in the file \s-1LICENSE\s0 in the source distribution or at
776 <https://www.openssl.org/source/license.html>.