Debian Codegraph @

upstream/debian-unstable/man3/X509_VERIFY_PARAM_set_flags.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "X509_VERIFY_PARAM_SET_FLAGS 3SSL"
58 .TH X509_VERIFY_PARAM_SET_FLAGS 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 X509_VERIFY_PARAM_set_flags, X509_VERIFY_PARAM_clear_flags,
65 X509_VERIFY_PARAM_get_flags, X509_VERIFY_PARAM_set_purpose,
66 X509_VERIFY_PARAM_get_purpose,
67 X509_VERIFY_PARAM_get_inh_flags, X509_VERIFY_PARAM_set_inh_flags,
68 X509_VERIFY_PARAM_set_trust, X509_VERIFY_PARAM_set_depth,
69 X509_VERIFY_PARAM_get_depth, X509_VERIFY_PARAM_set_auth_level,
70 X509_VERIFY_PARAM_get_auth_level, X509_VERIFY_PARAM_set_time,
71 X509_VERIFY_PARAM_get_time,
72 X509_VERIFY_PARAM_add0_policy, X509_VERIFY_PARAM_set1_policies,
73 X509_VERIFY_PARAM_get0_host,
74 X509_VERIFY_PARAM_set1_host, X509_VERIFY_PARAM_add1_host,
75 X509_VERIFY_PARAM_set_hostflags,
76 X509_VERIFY_PARAM_get_hostflags,
77 X509_VERIFY_PARAM_get0_peername,
78 X509_VERIFY_PARAM_get0_email, X509_VERIFY_PARAM_set1_email,
79 X509_VERIFY_PARAM_set1_ip, X509_VERIFY_PARAM_get1_ip_asc,
80 X509_VERIFY_PARAM_set1_ip_asc
81 \&\- X509 verification parameters
82 .SH SYNOPSIS
83 .IX Header "SYNOPSIS"
84 .Vb 1
85 \& #include <openssl/x509_vfy.h>
86 \&
87 \& int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
88 \& unsigned long flags);
89 \& int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
90 \& unsigned long flags);
91 \& unsigned long X509_VERIFY_PARAM_get_flags(const X509_VERIFY_PARAM *param);
92 \&
93 \& int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param,
94 \& uint32_t flags);
95 \& uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param);
96 \&
97 \& int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
98 \& int X509_VERIFY_PARAM_get_purpose(X509_VERIFY_PARAM *param);
99 \& int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
100 \&
101 \& void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
102 \& time_t X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param);
103 \&
104 \& int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
105 \& ASN1_OBJECT *policy);
106 \& int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
107 \& STACK_OF(ASN1_OBJECT) *policies);
108 \&
109 \& void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
110 \& int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
111 \&
112 \& void X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param,
113 \& int auth_level);
114 \& int X509_VERIFY_PARAM_get_auth_level(const X509_VERIFY_PARAM *param);
115 \&
116 \& char *X509_VERIFY_PARAM_get0_host(X509_VERIFY_PARAM *param, int n);
117 \& int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
118 \& const char *name, size_t namelen);
119 \& int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
120 \& const char *name, size_t namelen);
121 \& void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
122 \& unsigned int flags);
123 \& unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param);
124 \& char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param);
125 \& char *X509_VERIFY_PARAM_get0_email(X509_VERIFY_PARAM *param);
126 \& int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
127 \& const char *email, size_t emaillen);
128 \& char *X509_VERIFY_PARAM_get1_ip_asc(X509_VERIFY_PARAM *param);
129 \& int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
130 \& const unsigned char *ip, size_t iplen);
131 \& int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc);
132 .Ve
133 .SH DESCRIPTION
134 .IX Header "DESCRIPTION"
135 These functions manipulate the \fBX509_VERIFY_PARAM\fR structure associated with
136 a certificate verification operation.
137 .PP
138 The \fBX509_VERIFY_PARAM_set_flags()\fR function sets the flags in \fBparam\fR by oring
139 it with \fBflags\fR. See "VERIFICATION FLAGS" for a complete
140 description of values the \fBflags\fR parameter can take.
141 .PP
142 \&\fBX509_VERIFY_PARAM_get_flags()\fR returns the flags in \fBparam\fR.
143 .PP
144 \&\fBX509_VERIFY_PARAM_get_inh_flags()\fR returns the inheritance flags in \fBparam\fR
145 which specifies how verification flags are copied from one structure to
146 another. \fBX509_VERIFY_PARAM_set_inh_flags()\fR sets the inheritance flags.
147 See the \fBINHERITANCE FLAGS\fR section for a description of these bits.
148 .PP
149 \&\fBX509_VERIFY_PARAM_clear_flags()\fR clears the flags \fBflags\fR in \fBparam\fR.
150 .PP
151 \&\fBX509_VERIFY_PARAM_set_purpose()\fR sets the verification purpose in \fBparam\fR
152 to \fBpurpose\fR. This determines the acceptable purpose of the certificate
153 chain, for example \fBX509_PURPOSE_SSL_CLIENT\fR.
154 The purpose requirement is cleared if \fBpurpose\fR is X509_PURPOSE_DEFAULT_ANY.
155 .PP
156 \&\fBX509_VERIFY_PARAM_get_purpose()\fR returns the purpose in \fBparam\fR.
157 .PP
158 \&\fBX509_VERIFY_PARAM_set_trust()\fR sets the trust setting in \fBparam\fR to
159 \&\fBtrust\fR.
160 .PP
161 \&\fBX509_VERIFY_PARAM_set_time()\fR sets the verification time in \fBparam\fR to
162 \&\fBt\fR. Normally the current time is used.
163 .PP
164 \&\fBX509_VERIFY_PARAM_add0_policy()\fR adds \fBpolicy\fR to the acceptable policy set.
165 Contrary to preexisting documentation of this function it does not enable
166 policy checking.
167 .PP
168 \&\fBX509_VERIFY_PARAM_set1_policies()\fR enables policy checking (it is disabled
169 by default) and sets the acceptable policy set to \fBpolicies\fR. Any existing
170 policy set is cleared. The \fBpolicies\fR parameter can be \fBNULL\fR to clear
171 an existing policy set.
172 .PP
173 \&\fBX509_VERIFY_PARAM_set_depth()\fR sets the maximum verification depth to \fBdepth\fR.
174 That is the maximum number of intermediate CA certificates that can appear in a
175 chain.
176 A maximal depth chain contains 2 more certificates than the limit, since
177 neither the end-entity certificate nor the trust-anchor count against this
178 limit.
179 Thus a \fBdepth\fR limit of 0 only allows the end-entity certificate to be signed
180 directly by the trust anchor, while with a \fBdepth\fR limit of 1 there can be one
181 intermediate CA certificate between the trust anchor and the end-entity
182 certificate.
183 .PP
184 \&\fBX509_VERIFY_PARAM_set_auth_level()\fR sets the authentication security level to
185 \&\fBauth_level\fR.
186 The authentication security level determines the acceptable signature and public
187 key strength when verifying certificate chains.
188 For a certificate chain to validate, the public keys of all the certificates
189 must meet the specified security level.
190 The signature algorithm security level is not enforced for the chain's \fItrust
191 anchor\fR certificate, which is either directly trusted or validated by means other
192 than its signature.
193 See \fBSSL_CTX_set_security_level\fR\|(3) for the definitions of the available
194 levels.
195 The default security level is \-1, or "not set".
196 At security level 0 or lower all algorithms are acceptable.
197 Security level 1 requires at least 80\-bit\-equivalent security and is broadly
198 interoperable, though it will, for example, reject MD5 signatures or RSA keys
199 shorter than 1024 bits.
200 .PP
201 \&\fBX509_VERIFY_PARAM_get0_host()\fR returns the \fBn\fRth expected DNS hostname that has
202 been set using \fBX509_VERIFY_PARAM_set1_host()\fR or \fBX509_VERIFY_PARAM_add1_host()\fR.
203 To obtain all names start with \fBn\fR = 0 and increment \fBn\fR as long as no NULL
204 pointer is returned.
205 .PP
206 \&\fBX509_VERIFY_PARAM_set1_host()\fR sets the expected DNS hostname to
207 \&\fBname\fR clearing any previously specified hostname. If
208 \&\fBname\fR is NULL, or empty the list of hostnames is cleared, and
209 name checks are not performed on the peer certificate. If \fBname\fR
210 is NUL-terminated, \fBnamelen\fR may be zero, otherwise \fBnamelen\fR
211 must be set to the length of \fBname\fR.
212 .PP
213 When a hostname is specified,
214 certificate verification automatically invokes \fBX509_check_host\fR\|(3)
215 with flags equal to the \fBflags\fR argument given to
216 \&\fBX509_VERIFY_PARAM_set_hostflags()\fR (default zero). Applications
217 are strongly advised to use this interface in preference to explicitly
218 calling \fBX509_check_host\fR\|(3), hostname checks may be out of scope
219 with the \fBDANE\-EE\fR\|(3) certificate usage, and the internal check will
220 be suppressed as appropriate when DANE verification is enabled.
221 .PP
222 When the subject CommonName will not be ignored, whether as a result of the
223 \&\fBX509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT\fR host flag, or because no DNS subject
224 alternative names are present in the certificate, any DNS name constraints in
225 issuer certificates apply to the subject CommonName as well as the subject
226 alternative name extension.
227 .PP
228 When the subject CommonName will be ignored, whether as a result of the
229 \&\fBX509_CHECK_FLAG_NEVER_CHECK_SUBJECT\fR host flag, or because some DNS subject
230 alternative names are present in the certificate, DNS name constraints in
231 issuer certificates will not be applied to the subject DN.
232 As described in \fBX509_check_host\fR\|(3) the \fBX509_CHECK_FLAG_NEVER_CHECK_SUBJECT\fR
233 flag takes precedence over the \fBX509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT\fR flag.
234 .PP
235 \&\fBX509_VERIFY_PARAM_get_hostflags()\fR returns any host flags previously set via a
236 call to \fBX509_VERIFY_PARAM_set_hostflags()\fR.
237 .PP
238 \&\fBX509_VERIFY_PARAM_add1_host()\fR adds \fBname\fR as an additional reference
239 identifier that can match the peer's certificate. Any previous names
240 set via \fBX509_VERIFY_PARAM_set1_host()\fR or \fBX509_VERIFY_PARAM_add1_host()\fR
241 are retained, no change is made if \fBname\fR is NULL or empty. When
242 multiple names are configured, the peer is considered verified when
243 any name matches.
244 .PP
245 \&\fBX509_VERIFY_PARAM_get0_peername()\fR returns the DNS hostname or subject
246 CommonName from the peer certificate that matched one of the reference
247 identifiers. When wildcard matching is not disabled, or when a
248 reference identifier specifies a parent domain (starts with ".")
249 rather than a hostname, the peer name may be a wildcard name or a
250 sub-domain of the reference identifier respectively. The return
251 string is allocated by the library and is no longer valid once the
252 associated \fBparam\fR argument is freed. Applications must not free
253 the return value.
254 .PP
255 \&\fBX509_VERIFY_PARAM_get0_email()\fR returns the expected RFC822 email address.
256 .PP
257 \&\fBX509_VERIFY_PARAM_set1_email()\fR sets the expected RFC822 email address to
258 \&\fBemail\fR. If \fBemail\fR is NUL-terminated, \fBemaillen\fR may be zero, otherwise
259 \&\fBemaillen\fR must be set to the length of \fBemail\fR. When an email address
260 is specified, certificate verification automatically invokes
261 \&\fBX509_check_email\fR\|(3).
262 .PP
263 \&\fBX509_VERIFY_PARAM_get1_ip_asc()\fR returns the expected IP address as a string.
264 The caller is responsible for freeing it.
265 .PP
266 \&\fBX509_VERIFY_PARAM_set1_ip()\fR sets the expected IP address to \fBip\fR.
267 The \fBip\fR argument is in binary format, in network byte-order and
268 \&\fBiplen\fR must be set to 4 for IPv4 and 16 for IPv6. When an IP
269 address is specified, certificate verification automatically invokes
270 \&\fBX509_check_ip\fR\|(3).
271 .PP
272 \&\fBX509_VERIFY_PARAM_set1_ip_asc()\fR sets the expected IP address to
273 \&\fBipasc\fR. The \fBipasc\fR argument is a NUL-terminal ASCII string:
274 dotted decimal quad for IPv4 and colon-separated hexadecimal for
275 IPv6. The condensed "::" notation is supported for IPv6 addresses.
276 .SH "RETURN VALUES"
277 .IX Header "RETURN VALUES"
278 \&\fBX509_VERIFY_PARAM_set_flags()\fR, \fBX509_VERIFY_PARAM_clear_flags()\fR,
279 \&\fBX509_VERIFY_PARAM_set_inh_flags()\fR,
280 \&\fBX509_VERIFY_PARAM_set_purpose()\fR, \fBX509_VERIFY_PARAM_set_trust()\fR,
281 \&\fBX509_VERIFY_PARAM_add0_policy()\fR \fBX509_VERIFY_PARAM_set1_policies()\fR,
282 \&\fBX509_VERIFY_PARAM_set1_host()\fR, \fBX509_VERIFY_PARAM_add1_host()\fR,
283 \&\fBX509_VERIFY_PARAM_set1_email()\fR, \fBX509_VERIFY_PARAM_set1_ip()\fR and
284 \&\fBX509_VERIFY_PARAM_set1_ip_asc()\fR return 1 for success and 0 for
285 failure.
286 .PP
287 \&\fBX509_VERIFY_PARAM_get0_host()\fR, \fBX509_VERIFY_PARAM_get0_email()\fR, and
288 \&\fBX509_VERIFY_PARAM_get1_ip_asc()\fR, return the string pointers specified above
289 or NULL if the respective value has not been set or on error.
290 .PP
291 \&\fBX509_VERIFY_PARAM_get_flags()\fR returns the current verification flags.
292 .PP
293 \&\fBX509_VERIFY_PARAM_get_hostflags()\fR returns any current host flags.
294 .PP
295 \&\fBX509_VERIFY_PARAM_get_inh_flags()\fR returns the current inheritance flags.
296 .PP
297 \&\fBX509_VERIFY_PARAM_set_time()\fR and \fBX509_VERIFY_PARAM_set_depth()\fR do not return
298 values.
299 .PP
300 \&\fBX509_VERIFY_PARAM_get_depth()\fR returns the current verification depth.
301 .PP
302 \&\fBX509_VERIFY_PARAM_get_auth_level()\fR returns the current authentication security
303 level.
304 .PP
305 \&\fBX509_VERIFY_PARAM_get_purpose()\fR returns the current purpose,
306 which may be \fBX509_PURPOSE_DEFAULT_ANY\fR if unset.
307 .SH "VERIFICATION FLAGS"
308 .IX Header "VERIFICATION FLAGS"
309 The verification flags consists of zero or more of the following flags
310 ored together.
311 .PP
312 \&\fBX509_V_FLAG_CRL_CHECK\fR enables CRL checking for the certificate chain leaf
313 certificate. An error occurs if a suitable CRL cannot be found.
314 .PP
315 \&\fBX509_V_FLAG_CRL_CHECK_ALL\fR expands CRL checking to the entire certificate
316 chain if \fBX509_V_FLAG_CRL_CHECK\fR has also been enabled, and is otherwise ignored.
317 .PP
318 \&\fBX509_V_FLAG_OCSP_RESP_CHECK\fR enables Online Certificate Status Protocol (OCSP)
319 checking for the certificate chain leaf certificate. An error occurs if a suitable
320 OCSP response cannot be found.
321 .PP
322 \&\fBX509_V_FLAG_OCSP_RESP_CHECK_ALL\fR expands OCSP checking to the entire certificate
323 chain if \fBX509_V_FLAG_OCSP_RESP_CHECK\fR has also been enabled, and is otherwise
324 ignored.
325 .PP
326 \&\fBX509_V_FLAG_IGNORE_CRITICAL\fR disables critical extension checking. By default
327 any unhandled critical extensions in certificates or (if checked) CRLs result
328 in a fatal error. If this flag is set unhandled critical extensions are
329 ignored. \fBWARNING\fR setting this option for anything other than debugging
330 purposes can be a security risk. Finer control over which extensions are
331 supported can be performed in the verification callback.
332 .PP
333 The \fBX509_V_FLAG_X509_STRICT\fR flag disables workarounds for some broken
334 certificates and makes the verification strictly apply \fBX509\fR rules.
335 .PP
336 \&\fBX509_V_FLAG_ALLOW_PROXY_CERTS\fR enables proxy certificate verification.
337 .PP
338 \&\fBX509_V_FLAG_POLICY_CHECK\fR enables certificate policy checking, by default
339 no policy checking is performed. Additional information is sent to the
340 verification callback relating to policy checking.
341 .PP
342 \&\fBX509_V_FLAG_EXPLICIT_POLICY\fR, \fBX509_V_FLAG_INHIBIT_ANY\fR and
343 \&\fBX509_V_FLAG_INHIBIT_MAP\fR set the \fBrequire explicit policy\fR, \fBinhibit any
344 policy\fR and \fBinhibit policy mapping\fR flags respectively as defined in
345 \&\fBRFC3280\fR. Policy checking is automatically enabled if any of these flags
346 are set.
347 .PP
348 If \fBX509_V_FLAG_NOTIFY_POLICY\fR is set and the policy checking is successful
349 a special status code is set to the verification callback. This permits it
350 to examine the valid policy tree and perform additional checks or simply
351 log it for debugging purposes.
352 .PP
353 By default some additional features such as indirect CRLs and CRLs signed by
354 different keys are disabled. If \fBX509_V_FLAG_EXTENDED_CRL_SUPPORT\fR is set
355 they are enabled.
356 .PP
357 If \fBX509_V_FLAG_USE_DELTAS\fR is set delta CRLs (if present) are used to
358 determine certificate status. If not set deltas are ignored.
359 .PP
360 \&\fBX509_V_FLAG_CHECK_SS_SIGNATURE\fR requests checking the signature of
361 the last certificate in a chain if the certificate is supposedly self-signed.
362 This is prohibited and will result in an error if it is a non-conforming CA
363 certificate with key usage restrictions not including the \fIkeyCertSign\fR bit.
364 By default this check is disabled because it doesn't
365 add any additional security but in some cases applications might want to
366 check the signature anyway. A side effect of not checking the self-signature
367 of such a certificate is that disabled or unsupported message digests used for
368 the signature are not treated as fatal errors.
369 .PP
370 When \fBX509_V_FLAG_TRUSTED_FIRST\fR is set, which is always the case since
371 OpenSSL 1.1.0, construction of the certificate chain
372 in \fBX509_verify_cert\fR\|(3) searches the trust store for issuer certificates
373 before searching the provided untrusted certificates.
374 Local issuer certificates are often more likely to satisfy local security
375 requirements and lead to a locally trusted root.
376 This is especially important when some certificates in the trust store have
377 explicit trust settings (see "TRUST SETTINGS" in \fBopenssl\-x509\fR\|(1)).
378 .PP
379 The \fBX509_V_FLAG_NO_ALT_CHAINS\fR flag could have been used before OpenSSL 1.1.0
380 to suppress checking for alternative chains.
381 By default, unless \fBX509_V_FLAG_TRUSTED_FIRST\fR is set, when building a
382 certificate chain, if the first certificate chain found is not trusted, then
383 OpenSSL will attempt to replace untrusted certificates supplied by the peer
384 with certificates from the trust store to see if an alternative chain can be
385 found that is trusted.
386 As of OpenSSL 1.1.0, with \fBX509_V_FLAG_TRUSTED_FIRST\fR always set, this option
387 has no effect.
388 .PP
389 The \fBX509_V_FLAG_PARTIAL_CHAIN\fR flag causes non-self-signed certificates in the
390 trust store to be treated as trust anchors, in the same way as self-signed
391 root CA certificates.
392 This makes it possible to trust self-issued certificates as well as certificates
393 issued by an intermediate CA without having to trust their ancestor root CA.
394 With OpenSSL 1.1.0 and later and \fBX509_V_FLAG_PARTIAL_CHAIN\fR set, chain
395 construction stops as soon as the first certificate contained in the trust store
396 is added to the chain, whether that certificate is a self-signed "root"
397 certificate or a not self-signed "intermediate" or self-issued certificate.
398 Thus, when an intermediate certificate is found in the trust store, the
399 verified chain passed to callbacks may be shorter than it otherwise would
400 be without the \fBX509_V_FLAG_PARTIAL_CHAIN\fR flag.
401 .PP
402 The \fBX509_V_FLAG_NO_CHECK_TIME\fR flag suppresses checking the validity period
403 of certificates and CRLs against the current time. If \fBX509_VERIFY_PARAM_set_time()\fR
404 is used to specify a verification time, the check is not suppressed.
405 .SH "INHERITANCE FLAGS"
406 .IX Header "INHERITANCE FLAGS"
407 These flags specify how parameters are "inherited" from one structure to
408 another.
409 .PP
410 If \fBX509_VP_FLAG_ONCE\fR is set then the current setting is zeroed
411 after the next call.
412 .PP
413 If \fBX509_VP_FLAG_LOCKED\fR is set then no values are copied. This overrides
414 all of the following flags.
415 .PP
416 If \fBX509_VP_FLAG_DEFAULT\fR is set then anything set in the source is copied
417 to the destination. Effectively the values in "to" become default values
418 which will be used only if nothing new is set in "from". This is the
419 default.
420 .PP
421 If \fBX509_VP_FLAG_OVERWRITE\fR is set then all value are copied across whether
422 they are set or not. Flags is still Ored though.
423 .PP
424 If \fBX509_VP_FLAG_RESET_FLAGS\fR is set then the flags value is copied instead
425 of ORed.
426 .SH NOTES
427 .IX Header "NOTES"
428 The above functions should be used to manipulate verification parameters
429 instead of functions which work in specific structures such as
430 \&\fBX509_STORE_CTX_set_flags()\fR which are likely to be deprecated in a future
431 release.
432 .SH BUGS
433 .IX Header "BUGS"
434 Delta CRL checking is currently primitive. Only a single delta can be used and
435 (partly due to limitations of \fBX509_STORE\fR) constructed CRLs are not
436 maintained.
437 .PP
438 If CRLs checking is enable CRLs are expected to be available in the
439 corresponding \fBX509_STORE\fR structure. No attempt is made to download
440 CRLs from the CRL distribution points extension.
441 .SH EXAMPLES
442 .IX Header "EXAMPLES"
443 Enable CRL checking when performing certificate verification during SSL
444 connections associated with an \fBSSL_CTX\fR structure \fBctx\fR:
445 .PP
446 .Vb 1
447 \& X509_VERIFY_PARAM *param;
448 \&
449 \& param = X509_VERIFY_PARAM_new();
450 \& X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK);
451 \& SSL_CTX_set1_param(ctx, param);
452 \& X509_VERIFY_PARAM_free(param);
453 .Ve
454 .SH "SEE ALSO"
455 .IX Header "SEE ALSO"
456 \&\fBX509_verify_cert\fR\|(3),
457 \&\fBX509_check_host\fR\|(3),
458 \&\fBX509_check_email\fR\|(3),
459 \&\fBX509_check_ip\fR\|(3),
460 \&\fBopenssl\-x509\fR\|(1)
461 .SH HISTORY
462 .IX Header "HISTORY"
463 The \fBX509_V_FLAG_NO_ALT_CHAINS\fR flag was added in OpenSSL 1.1.0.
464 The flag \fBX509_V_FLAG_CB_ISSUER_CHECK\fR was deprecated in OpenSSL 1.1.0
465 and has no effect.
466 .PP
467 The \fBX509_VERIFY_PARAM_get_hostflags()\fR function was added in OpenSSL 1.1.0i.
468 .PP
469 The \fBX509_VERIFY_PARAM_get0_host()\fR, \fBX509_VERIFY_PARAM_get0_email()\fR,
470 and \fBX509_VERIFY_PARAM_get1_ip_asc()\fR functions were added in OpenSSL 3.0.
471 .PP
472 The function \fBX509_VERIFY_PARAM_add0_policy()\fR was historically documented as
473 enabling policy checking however the implementation has never done this.
474 The documentation was changed to align with the implementation.
475 .PP
476 The \fBX509_VERIFY_PARAM_get_purpose()\fR function was added in OpenSSL 3.5.
477 .SH COPYRIGHT
478 .IX Header "COPYRIGHT"
479 Copyright 2009\-2025 The OpenSSL Project Authors. All Rights Reserved.
480 .PP
481 Licensed under the Apache License 2.0 (the "License"). You may not use
482 this file except in compliance with the License. You can obtain a copy
483 in the file LICENSE in the source distribution or at
484 <https://www.openssl.org/source/license.html>.