]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3
MFC: r340703
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / X509_STORE_set_verify_cb_func.3
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 "X509_STORE_SET_VERIFY_CB_FUNC 3"
132 .TH X509_STORE_SET_VERIFY_CB_FUNC 3 "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 X509_STORE_set_lookup_crls_cb, X509_STORE_set_verify_func, X509_STORE_get_cleanup, X509_STORE_set_cleanup, X509_STORE_get_lookup_crls, X509_STORE_set_lookup_crls, X509_STORE_get_lookup_certs, X509_STORE_set_lookup_certs, X509_STORE_get_check_policy, X509_STORE_set_check_policy, X509_STORE_get_cert_crl, X509_STORE_set_cert_crl, X509_STORE_get_check_crl, X509_STORE_set_check_crl, X509_STORE_get_get_crl, X509_STORE_set_get_crl, X509_STORE_get_check_revocation, X509_STORE_set_check_revocation, X509_STORE_get_check_issued, X509_STORE_set_check_issued, X509_STORE_get_get_issuer, X509_STORE_set_get_issuer, X509_STORE_CTX_get_verify, X509_STORE_set_verify, X509_STORE_get_verify_cb, X509_STORE_set_verify_cb_func, X509_STORE_set_verify_cb, X509_STORE_CTX_cert_crl_fn, X509_STORE_CTX_check_crl_fn, X509_STORE_CTX_check_issued_fn, X509_STORE_CTX_check_policy_fn, X509_STORE_CTX_check_revocation_fn, X509_STORE_CTX_cleanup_fn, X509_STORE_CTX_get_crl_fn, X509_STORE_CTX_get_issuer_fn, X509_STORE_CTX_lookup_certs_fn, X509_STORE_CTX_lookup_crls_fn \&\- set verification callback
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 .Vb 1
142 \& #include <openssl/x509_vfy.h>
143 \&
144 \& typedef int (*X509_STORE_CTX_get_issuer_fn)(X509 **issuer,
145 \&                                             X509_STORE_CTX *ctx, X509 *x);
146 \& typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx,
147 \&                                               X509 *x, X509 *issuer);
148 \& typedef int (*X509_STORE_CTX_check_revocation_fn)(X509_STORE_CTX *ctx);
149 \& typedef int (*X509_STORE_CTX_get_crl_fn)(X509_STORE_CTX *ctx,
150 \&                                          X509_CRL **crl, X509 *x);
151 \& typedef int (*X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl);
152 \& typedef int (*X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx,
153 \&                                           X509_CRL *crl, X509 *x);
154 \& typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx);
155 \& typedef STACK_OF(X509) *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx,
156 \&                                                           X509_NAME *nm);
157 \& typedef STACK_OF(X509_CRL) *(*X509_STORE_CTX_lookup_crls_fn)(X509_STORE_CTX *ctx,
158 \&                                                              X509_NAME *nm);
159 \& typedef int (*X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx);
160 \&
161 \& void X509_STORE_set_verify_cb(X509_STORE *ctx,
162 \&                               X509_STORE_CTX_verify_cb verify_cb);
163 \& X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE_CTX *ctx);
164 \&
165 \& void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify);
166 \& X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx);
167 \&
168 \& void X509_STORE_set_get_issuer(X509_STORE *ctx,
169 \&                                X509_STORE_CTX_get_issuer_fn get_issuer);
170 \& X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(X509_STORE_CTX *ctx);
171 \&
172 \& void X509_STORE_set_check_issued(X509_STORE *ctx,
173 \&                                  X509_STORE_CTX_check_issued_fn check_issued);
174 \& X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(X509_STORE_CTX *ctx);
175 \&
176 \& void X509_STORE_set_check_revocation(X509_STORE *ctx,
177 \&                                      X509_STORE_CTX_check_revocation_fn check_revocation);
178 \& X509_STORE_CTX_check_revocation_fn X509_STORE_get_check_revocation(X509_STORE_CTX *ctx);
179 \&
180 \& void X509_STORE_set_get_crl(X509_STORE *ctx,
181 \&                             X509_STORE_CTX_get_crl_fn get_crl);
182 \& X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(X509_STORE_CTX *ctx);
183 \&
184 \& void X509_STORE_set_check_crl(X509_STORE *ctx,
185 \&                               X509_STORE_CTX_check_crl_fn check_crl);
186 \& X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(X509_STORE_CTX *ctx);
187 \&
188 \& void X509_STORE_set_cert_crl(X509_STORE *ctx,
189 \&                              X509_STORE_CTX_cert_crl_fn cert_crl);
190 \& X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(X509_STORE_CTX *ctx);
191 \&
192 \& void X509_STORE_set_check_policy(X509_STORE *ctx,
193 \&                                  X509_STORE_CTX_check_policy_fn check_policy);
194 \& X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(X509_STORE_CTX *ctx);
195 \&
196 \& void X509_STORE_set_lookup_certs(X509_STORE *ctx,
197 \&                                  X509_STORE_CTX_lookup_certs_fn lookup_certs);
198 \& X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(X509_STORE_CTX *ctx);
199 \&
200 \& void X509_STORE_set_lookup_crls(X509_STORE *ctx,
201 \&                                 X509_STORE_CTX_lookup_crls_fn lookup_crls);
202 \& X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(X509_STORE_CTX *ctx);
203 \&
204 \& void X509_STORE_set_cleanup(X509_STORE *ctx,
205 \&                             X509_STORE_CTX_cleanup_fn cleanup);
206 \& X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(X509_STORE_CTX *ctx);
207 \&
208 \& /* Aliases */
209 \& void X509_STORE_set_verify_cb_func(X509_STORE *st,
210 \&                                    X509_STORE_CTX_verify_cb verify_cb);
211 \& void X509_STORE_set_verify_func(X509_STORE *ctx,
212 \&                                 X509_STORE_CTX_verify_fn verify);
213 \& void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
214 \&                                    X509_STORE_CTX_lookup_crls_fn lookup_crls);
215 .Ve
216 .SH "DESCRIPTION"
217 .IX Header "DESCRIPTION"
218 \&\fIX509_STORE_set_verify_cb()\fR sets the verification callback of \fBctx\fR to
219 \&\fBverify_cb\fR overwriting the previous callback.
220 The callback assigned with this function becomes a default for the one
221 that can be assigned directly to the corresponding \fBX509_STORE_CTX\fR,
222 please see \fIX509_STORE_CTX_set_verify_cb\fR\|(3) for further information.
223 .PP
224 \&\fIX509_STORE_set_verify()\fR sets the final chain verification function for
225 \&\fBctx\fR to \fBverify\fR.
226 Its purpose is to go through the chain of certificates and check that
227 all signatures are valid and that the current time is within the
228 limits of each certificate's first and last validity time.
229 The final chain verification functions must return 0 on failure and 1
230 on success.
231 \&\fIIf no chain verification function is provided, the internal default
232 function will be used instead.\fR
233 .PP
234 \&\fIX509_STORE_set_get_issuer()\fR sets the function to get the issuer
235 certificate that verifies the given certificate \fBx\fR.
236 When found, the issuer certificate must be assigned to \fB*issuer\fR.
237 This function must return 0 on failure and 1 on success.
238 \&\fIIf no function to get the issuer is provided, the internal default
239 function will be used instead.\fR
240 .PP
241 \&\fIX509_STORE_set_check_issued()\fR sets the function to check that a given
242 certificate \fBx\fR is issued with the issuer certificate \fBissuer\fR.
243 This function must return 0 on failure (among others if \fBx\fR hasn't
244 been issued with \fBissuer\fR) and 1 on success.
245 \&\fIIf no function to get the issuer is provided, the internal default
246 function will be used instead.\fR
247 .PP
248 \&\fIX509_STORE_set_check_revocation()\fR sets the revocation checking
249 function.
250 Its purpose is to look through the final chain and check the
251 revocation status for each certificate.
252 It must return 0 on failure and 1 on success.
253 \&\fIIf no function to get the issuer is provided, the internal default
254 function will be used instead.\fR
255 .PP
256 \&\fIX509_STORE_set_get_crl()\fR sets the function to get the crl for a given
257 certificate \fBx\fR.
258 When found, the crl must be assigned to \fB*crl\fR.
259 This function must return 0 on failure and 1 on success.
260 \&\fIIf no function to get the issuer is provided, the internal default
261 function will be used instead.\fR
262 .PP
263 \&\fIX509_STORE_set_check_crl()\fR sets the function to check the validity of
264 the given \fBcrl\fR.
265 This function must return 0 on failure and 1 on success.
266 \&\fIIf no function to get the issuer is provided, the internal default
267 function will be used instead.\fR
268 .PP
269 \&\fIX509_STORE_set_cert_crl()\fR sets the function to check the revocation
270 status of the given certificate \fBx\fR against the given \fBcrl\fR.
271 This function must return 0 on failure and 1 on success.
272 \&\fIIf no function to get the issuer is provided, the internal default
273 function will be used instead.\fR
274 .PP
275 \&\fIX509_STORE_set_check_policy()\fR sets the function to check the policies
276 of all the certificates in the final chain..
277 This function must return 0 on failure and 1 on success.
278 \&\fIIf no function to get the issuer is provided, the internal default
279 function will be used instead.\fR
280 .PP
281 \&\fIX509_STORE_set_lookup_certs()\fR and \fIX509_STORE_set_lookup_crls()\fR set the
282 functions to look up all the certs or all the CRLs that match the
283 given name \fBnm\fR.
284 These functions return \s-1NULL\s0 on failure and a pointer to a stack of
285 certificates (\fBX509\fR) or to a stack of CRLs (\fBX509_CRL\fR) on
286 success.
287 \&\fIIf no function to get the issuer is provided, the internal default
288 function will be used instead.\fR
289 .PP
290 \&\fIX509_STORE_set_cleanup()\fR sets the final cleanup function, which is
291 called when the context (\fBX509_STORE_CTX\fR) is being torn down.
292 This function doesn't return any value.
293 \&\fIIf no function to get the issuer is provided, the internal default
294 function will be used instead.\fR
295 .PP
296 \&\fIX509_STORE_get_verify_cb()\fR, \fIX509_STORE_CTX_get_verify()\fR,
297 \&\fIX509_STORE_get_get_issuer()\fR, \fIX509_STORE_get_check_issued()\fR,
298 \&\fIX509_STORE_get_check_revocation()\fR, \fIX509_STORE_get_get_crl()\fR,
299 \&\fIX509_STORE_get_check_crl()\fR, \fIX509_STORE_set_verify()\fR,
300 \&\fIX509_STORE_set_get_issuer()\fR, \fIX509_STORE_get_cert_crl()\fR,
301 \&\fIX509_STORE_get_check_policy()\fR, \fIX509_STORE_get_lookup_certs()\fR,
302 \&\fIX509_STORE_get_lookup_crls()\fR and \fIX509_STORE_get_cleanup()\fR all return
303 the function pointer assigned with \fIX509_STORE_set_check_issued()\fR,
304 \&\fIX509_STORE_set_check_revocation()\fR, \fIX509_STORE_set_get_crl()\fR,
305 \&\fIX509_STORE_set_check_crl()\fR, \fIX509_STORE_set_cert_crl()\fR,
306 \&\fIX509_STORE_set_check_policy()\fR, \fIX509_STORE_set_lookup_certs()\fR,
307 \&\fIX509_STORE_set_lookup_crls()\fR and \fIX509_STORE_set_cleanup()\fR, or \s-1NULL\s0 if
308 no assignment has been made.
309 .PP
310 \&\fIX509_STORE_set_verify_cb_func()\fR, \fIX509_STORE_set_verify_func()\fR and
311 \&\fIX509_STORE_set_lookup_crls_cb()\fR are aliases for
312 \&\fIX509_STORE_set_verify_cb()\fR, \fIX509_STORE_set_verify()\fR and
313 X509_STORE_set_lookup_crls, available as macros for backward
314 compatibility.
315 .SH "NOTES"
316 .IX Header "NOTES"
317 All the callbacks from a \fBX509_STORE\fR are inherited by the
318 corresponding \fBX509_STORE_CTX\fR structure when it is initialized.
319 See \fIX509_STORE_CTX_set_verify_cb\fR\|(3) for further details.
320 .SH "BUGS"
321 .IX Header "BUGS"
322 The macro version of this function was the only one available before
323 OpenSSL 1.0.0.
324 .SH "RETURN VALUES"
325 .IX Header "RETURN VALUES"
326 The X509_STORE_set_*() functions do not return a value.
327 .PP
328 The X509_STORE_get_*() functions return a pointer of the appropriate
329 function type.
330 .SH "SEE ALSO"
331 .IX Header "SEE ALSO"
332 \&\fIX509_STORE_CTX_set_verify_cb\fR\|(3), \fIX509_STORE_CTX_get0_chain\fR\|(3),
333 \&\fIX509_STORE_CTX_verify_cb\fR\|(3), \fIX509_STORE_CTX_verify_fn\fR\|(3),
334 \&\fICMS_verify\fR\|(3)
335 .SH "HISTORY"
336 .IX Header "HISTORY"
337 \&\fIX509_STORE_set_verify_cb()\fR was added to OpenSSL 1.0.0.
338 .PP
339 \&\fIX509_STORE_set_verify_cb()\fR, \fIX509_STORE_get_verify_cb()\fR,
340 \&\fIX509_STORE_set_verify()\fR, \fIX509_STORE_CTX_get_verify()\fR,
341 \&\fIX509_STORE_set_get_issuer()\fR, \fIX509_STORE_get_get_issuer()\fR,
342 \&\fIX509_STORE_set_check_issued()\fR, \fIX509_STORE_get_check_issued()\fR,
343 \&\fIX509_STORE_set_check_revocation()\fR, \fIX509_STORE_get_check_revocation()\fR,
344 \&\fIX509_STORE_set_get_crl()\fR, \fIX509_STORE_get_get_crl()\fR,
345 \&\fIX509_STORE_set_check_crl()\fR, \fIX509_STORE_get_check_crl()\fR,
346 \&\fIX509_STORE_set_cert_crl()\fR, \fIX509_STORE_get_cert_crl()\fR,
347 \&\fIX509_STORE_set_check_policy()\fR, \fIX509_STORE_get_check_policy()\fR,
348 \&\fIX509_STORE_set_lookup_certs()\fR, \fIX509_STORE_get_lookup_certs()\fR,
349 \&\fIX509_STORE_set_lookup_crls()\fR, \fIX509_STORE_get_lookup_crls()\fR,
350 \&\fIX509_STORE_set_cleanup()\fR and \fIX509_STORE_get_cleanup()\fR were added in
351 OpenSSL 1.1.0.
352 .SH "COPYRIGHT"
353 .IX Header "COPYRIGHT"
354 Copyright 2009\-2016 The OpenSSL Project Authors. All Rights Reserved.
355 .PP
356 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
357 this file except in compliance with the License.  You can obtain a copy
358 in the file \s-1LICENSE\s0 in the source distribution or at
359 <https://www.openssl.org/source/license.html>.