Debian Codegraph @

templates/man3/SSL_CTX_set_verify.3ssl.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:44+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 # #-#-#-#-# archlinux: SSL_CTX_set_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
20 #
21 #. #-#-#-#-# archlinux: SSL_CTX_set_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
22 #. Required to disable full justification in groff 1.23.0.
23 #. ========================================================================
24 #. type: IX
25 #. #-#-#-#-# debian-trixie: SSL_CTX_set_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
26 #. ========================================================================
27 #. type: IX
28 #. #-#-#-#-# debian-unstable: SSL_CTX_set_verify.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
29 #. ========================================================================
30 #. type: IX
31 #: archlinux debian-trixie debian-unstable
32 #, no-wrap
33 msgid "Title"
34 msgstr ""
35
36 #
37 #. Required to disable full justification in groff 1.23.0.
38 #. ========================================================================
39 #. type: IX
40 #: archlinux
41 #, no-wrap
42 msgid "SSL_CTX_SET_VERIFY 3ssl"
43 msgstr ""
44
45 #. type: TH
46 #: archlinux debian-trixie debian-unstable
47 #, no-wrap
48 msgid "SSL_CTX_SET_VERIFY"
49 msgstr ""
50
51 #. type: TH
52 #: archlinux debian-trixie debian-unstable
53 #, no-wrap
54 msgid "2026-04-07"
55 msgstr ""
56
57 #. type: TH
58 #: archlinux debian-unstable
59 #, no-wrap
60 msgid "3.6.2"
61 msgstr ""
62
63 #. type: TH
64 #: archlinux debian-trixie debian-unstable
65 #, no-wrap
66 msgid "OpenSSL"
67 msgstr ""
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable
71 #, no-wrap
72 msgid "NAME"
73 msgstr ""
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable
77 msgid ""
78 "SSL_get_ex_data_X509_STORE_CTX_idx, SSL_CTX_set_verify, SSL_set_verify, "
79 "SSL_CTX_set_verify_depth, SSL_set_verify_depth, SSL_verify_cb, "
80 "SSL_verify_client_post_handshake, SSL_set_post_handshake_auth, "
81 "SSL_CTX_set_post_handshake_auth \\&- set various SSL/TLS parameters for peer "
82 "certificate verification"
83 msgstr ""
84
85 #. type: IX
86 #: archlinux debian-trixie debian-unstable
87 #, no-wrap
88 msgid "SYNOPSIS"
89 msgstr ""
90
91 #. type: IX
92 #: archlinux debian-trixie debian-unstable
93 #, no-wrap
94 msgid "Header"
95 msgstr ""
96
97 #. type: Plain text
98 #: archlinux debian-trixie debian-unstable
99 #, no-wrap
100 msgid ""
101 "\\& #include E<lt>openssl/ssl.hE<gt>\n"
102 "\\&\n"
103 "\\& typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx);\n"
104 "\\&\n"
105 "\\& void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, SSL_verify_cb verify_callback);\n"
106 "\\& void SSL_set_verify(SSL *ssl, int mode, SSL_verify_cb verify_callback);\n"
107 "\\& SSL_get_ex_data_X509_STORE_CTX_idx(void);\n"
108 "\\&\n"
109 "\\& void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth);\n"
110 "\\& void SSL_set_verify_depth(SSL *ssl, int depth);\n"
111 "\\&\n"
112 "\\& int SSL_verify_client_post_handshake(SSL *ssl);\n"
113 "\\& void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);\n"
114 "\\& void SSL_set_post_handshake_auth(SSL *ssl, int val);\n"
115 msgstr ""
116
117 #. type: IX
118 #: archlinux debian-trixie debian-unstable
119 #, no-wrap
120 msgid "DESCRIPTION"
121 msgstr ""
122
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable
125 msgid ""
126 "\\&B<SSL_CTX_set_verify()> sets the verification flags for B<ctx> to be "
127 "B<mode> and specifies the B<verify_callback> function to be used. If no "
128 "callback function shall be specified, the NULL pointer can be used for "
129 "B<verify_callback>. B<ctx> B<MUST NOT> be NULL."
130 msgstr ""
131
132 #. type: Plain text
133 #: archlinux debian-trixie debian-unstable
134 msgid ""
135 "\\&B<SSL_set_verify()> sets the verification flags for B<ssl> to be B<mode> "
136 "and specifies the B<verify_callback> function to be used. If no callback "
137 "function shall be specified, the NULL pointer can be used for "
138 "B<verify_callback>. In this case last B<verify_callback> set specifically "
139 "for this B<ssl> remains. If no special B<callback> was set before, the "
140 "default callback for the underlying \\&B<ctx> is used, that was valid at the "
141 "time B<ssl> was created with \\&B<SSL_new>\\|(3). Within the callback "
142 "function, \\&B<SSL_get_ex_data_X509_STORE_CTX_idx> can be called to get the "
143 "data index of the current SSL object that is doing the verification."
144 msgstr ""
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable
148 msgid ""
149 "In client mode B<verify_callback> may also call the "
150 "B<SSL_set_retry_verify>\\|(3) function on the B<SSL> object set in the "
151 "I<x509_store_ctx> ex data (see \\&B<SSL_get_ex_data_X509_STORE_CTX_idx>\\|"
152 "(3)) and return 1. This would be typically done in case the certificate "
153 "verification was not yet able to succeed. This makes the handshake suspend "
154 "and return control to the calling application with "
155 "B<SSL_ERROR_WANT_RETRY_VERIFY>. The application can for instance fetch "
156 "further certificates or cert status information needed for the "
157 "verification. Calling B<SSL_connect>\\|(3) again resumes the connection "
158 "attempt by retrying the server certificate verification step. This process "
159 "may even be repeated if need be. Note that the handshake may still be "
160 "aborted if a subsequent invocation of the callback (e.g., at a lower depth, "
161 "or for a separate error condition) returns 0."
162 msgstr ""
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable
166 msgid ""
167 "\\&B<SSL_CTX_set_verify_depth()> sets the maximum B<depth> for the "
168 "certificate chain verification that shall be allowed for B<ctx>."
169 msgstr ""
170
171 #. type: Plain text
172 #: archlinux debian-trixie debian-unstable
173 msgid ""
174 "\\&B<SSL_set_verify_depth()> sets the maximum B<depth> for the certificate "
175 "chain verification that shall be allowed for B<ssl>."
176 msgstr ""
177
178 #. type: Plain text
179 #: archlinux debian-trixie debian-unstable
180 msgid ""
181 "\\&B<SSL_CTX_set_post_handshake_auth()> and B<SSL_set_post_handshake_auth()> "
182 "enable the Post-Handshake Authentication extension to be added to the "
183 "ClientHello such that post-handshake authentication can be requested by the "
184 "server. If B<val> is 0 then the extension is not sent, otherwise it is. By "
185 "default the extension is not sent. A certificate callback will need to be "
186 "set via \\&B<SSL_CTX_set_client_cert_cb()> if no certificate is provided at "
187 "initialization."
188 msgstr ""
189
190 #. type: Plain text
191 #: archlinux debian-trixie debian-unstable
192 msgid ""
193 "\\&B<SSL_verify_client_post_handshake()> causes a CertificateRequest message "
194 "to be sent by a server on the given B<ssl> connection. The SSL_VERIFY_PEER "
195 "flag must be set; the SSL_VERIFY_POST_HANDSHAKE flag is optional."
196 msgstr ""
197
198 #. type: IX
199 #: archlinux debian-trixie debian-unstable
200 #, no-wrap
201 msgid "NOTES"
202 msgstr ""
203
204 #. type: Plain text
205 #: archlinux
206 msgid ""
207 "The verification of certificates can be controlled by a set of logically "
208 "or\\*(Aqed B<mode> flags:"
209 msgstr ""
210
211 #. type: IX
212 #: archlinux debian-trixie debian-unstable
213 #, no-wrap
214 msgid "SSL_VERIFY_NONE"
215 msgstr ""
216
217 #. type: IX
218 #: archlinux debian-trixie debian-unstable
219 #, no-wrap
220 msgid "Item"
221 msgstr ""
222
223 #. type: Plain text
224 #: archlinux debian-trixie debian-unstable
225 msgid ""
226 "\\&B<Server mode:> the server will not send a client certificate request to "
227 "the client, so the client will not send a certificate."
228 msgstr ""
229
230 #. type: Plain text
231 #: archlinux debian-trixie debian-unstable
232 msgid ""
233 "\\&B<Client mode:> if not using an anonymous cipher (by default disabled), "
234 "the server will send a certificate which will be checked. The result of the "
235 "certificate verification process can be checked after the TLS/SSL handshake "
236 "using the B<SSL_get_verify_result>\\|(3) function. The handshake will be "
237 "continued regardless of the verification result."
238 msgstr ""
239
240 #. type: IX
241 #: archlinux debian-trixie debian-unstable
242 #, no-wrap
243 msgid "SSL_VERIFY_PEER"
244 msgstr ""
245
246 #. type: Plain text
247 #: archlinux debian-trixie debian-unstable
248 msgid ""
249 "\\&B<Server mode:> the server sends a client certificate request to the "
250 "client. The certificate returned (if any) is checked. If the verification "
251 "process fails, the TLS/SSL handshake is immediately terminated with an alert "
252 "message containing the reason for the verification failure. The behaviour "
253 "can be controlled by the additional SSL_VERIFY_FAIL_IF_NO_PEER_CERT, "
254 "SSL_VERIFY_CLIENT_ONCE and SSL_VERIFY_POST_HANDSHAKE flags."
255 msgstr ""
256
257 #. type: Plain text
258 #: archlinux debian-trixie debian-unstable
259 msgid ""
260 "\\&B<Client mode:> the server certificate is verified. If the verification "
261 "process fails, the TLS/SSL handshake is immediately terminated with an alert "
262 "message containing the reason for the verification failure. If no server "
263 "certificate is sent, because an anonymous cipher is used, SSL_VERIFY_PEER is "
264 "ignored."
265 msgstr ""
266
267 #. type: IX
268 #: archlinux debian-trixie debian-unstable
269 #, no-wrap
270 msgid "SSL_VERIFY_FAIL_IF_NO_PEER_CERT"
271 msgstr ""
272
273 #. type: Plain text
274 #: archlinux debian-trixie debian-unstable
275 msgid ""
276 "\\&B<Server mode:> if the client did not return a certificate, the TLS/SSL "
277 "handshake is immediately terminated with a \"handshake failure\" alert. "
278 "This flag must be used together with SSL_VERIFY_PEER."
279 msgstr ""
280
281 #. type: Plain text
282 #: archlinux debian-trixie debian-unstable
283 msgid "\\&B<Client mode:> ignored (see BUGS)"
284 msgstr ""
285
286 #. type: IX
287 #: archlinux debian-trixie debian-unstable
288 #, no-wrap
289 msgid "SSL_VERIFY_CLIENT_ONCE"
290 msgstr ""
291
292 #. type: Plain text
293 #: archlinux debian-trixie debian-unstable
294 msgid ""
295 "\\&B<Server mode:> only request a client certificate once during the "
296 "connection. Do not ask for a client certificate again during renegotiation "
297 "or post-authentication if a certificate was requested during the initial "
298 "handshake. This flag must be used together with SSL_VERIFY_PEER."
299 msgstr ""
300
301 #. type: IX
302 #: archlinux debian-trixie debian-unstable
303 #, no-wrap
304 msgid "SSL_VERIFY_POST_HANDSHAKE"
305 msgstr ""
306
307 #. type: Plain text
308 #: archlinux debian-trixie debian-unstable
309 msgid ""
310 "\\&B<Server mode:> the server will not send a client certificate request "
311 "during the initial handshake, but will send the request via "
312 "\\&B<SSL_verify_client_post_handshake()>. This allows the SSL_CTX or SSL to "
313 "be configured for post-handshake peer verification before the handshake "
314 "occurs. This flag must be used together with SSL_VERIFY_PEER. TLSv1.3 only; "
315 "no effect on pre-TLSv1.3 connections."
316 msgstr ""
317
318 #. type: Plain text
319 #: archlinux debian-trixie debian-unstable
320 msgid "If the B<mode> is SSL_VERIFY_NONE none of the other flags may be set."
321 msgstr ""
322
323 #. type: Plain text
324 #: archlinux debian-trixie debian-unstable
325 msgid ""
326 "If verification flags are not modified explicitly by "
327 "CW<SSL_CTX_set_verify()> or CW<SSL_set_verify()>, the default value will be "
328 "SSL_VERIFY_NONE."
329 msgstr ""
330
331 #. type: Plain text
332 #: archlinux debian-trixie debian-unstable
333 msgid ""
334 "The actual verification procedure is performed either using the built-in "
335 "verification procedure or using another application provided verification "
336 "function set with \\&B<SSL_CTX_set_cert_verify_callback>\\|(3). The "
337 "following descriptions apply in the case of the built-in procedure. An "
338 "application provided procedure also has access to the verify depth "
339 "information and the B<verify_callback()> function, but the way this "
340 "information is used may be different."
341 msgstr ""
342
343 #. type: Plain text
344 #: archlinux debian-trixie debian-unstable
345 msgid ""
346 "\\&B<SSL_CTX_set_verify_depth()> and B<SSL_set_verify_depth()> set a limit "
347 "on the number of certificates between the end-entity and trust-anchor "
348 "certificates. Neither the end-entity nor the trust-anchor certificates "
349 "count against B<depth>. If the certificate chain needed to reach a trusted "
350 "issuer is longer than B<depth+2>, X509_V_ERR_CERT_CHAIN_TOO_LONG will be "
351 "issued. The depth count is \"level 0:peer certificate\", \"level 1: CA "
352 "certificate\", \"level 2: higher level CA certificate\", and so on. Setting "
353 "the maximum depth to 2 allows the levels 0, 1, 2 and 3 (0 being the end-"
354 "entity and 3 the trust-anchor). The default depth limit is 100, allowing "
355 "for the peer certificate, at most 100 intermediate CA certificates and a "
356 "final trust anchor certificate."
357 msgstr ""
358
359 #. type: Plain text
360 #: archlinux debian-trixie debian-unstable
361 msgid ""
362 "The B<verify_callback> function is used to control the behaviour when the "
363 "SSL_VERIFY_PEER flag is set. It must be supplied by the application and "
364 "receives two arguments: B<preverify_ok> indicates, whether the verification "
365 "of the certificate in question was passed (preverify_ok=1) or not "
366 "(preverify_ok=0). B<x509_ctx> is a pointer to the complete context used for "
367 "the certificate chain verification."
368 msgstr ""
369
370 #. type: Plain text
371 #: archlinux
372 msgid ""
373 "The certificate chain is checked starting with the deepest nesting level "
374 "(the root CA certificate) and worked upward to the peer\\*(Aqs certificate. "
375 "At each level signatures and issuer attributes are checked. Whenever a "
376 "verification error is found, the error number is stored in B<x509_ctx> and "
377 "B<verify_callback> is called with B<preverify_ok>=0. By applying "
378 "X509_CTX_store_* functions B<verify_callback> can locate the certificate in "
379 "question and perform additional steps (see EXAMPLES). If no error is found "
380 "for a certificate, B<verify_callback> is called with B<preverify_ok>=1 "
381 "before advancing to the next level."
382 msgstr ""
383
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable
386 msgid ""
387 "The return value of B<verify_callback> controls the strategy of the further "
388 "verification process. If B<verify_callback> returns 0, the verification "
389 "process is immediately stopped with \"verification failed\" state. If "
390 "SSL_VERIFY_PEER is set, a verification failure alert is sent to the peer and "
391 "the TLS/SSL handshake is terminated. If B<verify_callback> returns 1, the "
392 "verification process is continued. If B<verify_callback> always returns 1, "
393 "the TLS/SSL handshake will not be terminated with respect to verification "
394 "failures and the connection will be established. The calling process can "
395 "however retrieve the error code of the last verification error using "
396 "\\&B<SSL_get_verify_result>\\|(3) or by maintaining its own error storage "
397 "managed by B<verify_callback>."
398 msgstr ""
399
400 #. type: Plain text
401 #: archlinux debian-trixie debian-unstable
402 msgid ""
403 "If no B<verify_callback> is specified, the default callback will be used. "
404 "Its return value is identical to B<preverify_ok>, so that any verification "
405 "failure will lead to a termination of the TLS/SSL handshake with an alert "
406 "message, if SSL_VERIFY_PEER is set."
407 msgstr ""
408
409 #. type: Plain text
410 #: archlinux debian-trixie debian-unstable
411 msgid ""
412 "After calling B<SSL_set_post_handshake_auth()>, the client will need to add "
413 "a certificate or certificate callback to its configuration before it can "
414 "successfully authenticate. This must be called before B<SSL_connect()>."
415 msgstr ""
416
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable
419 msgid ""
420 "\\&B<SSL_verify_client_post_handshake()> requires that verify flags have "
421 "been previously set, and that a client sent the post-handshake "
422 "authentication extension. When the client returns a certificate the verify "
423 "callback will be invoked. A write operation must take place for the "
424 "Certificate Request to be sent to the client, this can be done with "
425 "B<SSL_do_handshake()> or B<SSL_write_ex()>. Only one certificate request "
426 "may be outstanding at any time."
427 msgstr ""
428
429 #. type: Plain text
430 #: archlinux debian-trixie debian-unstable
431 msgid ""
432 "When post-handshake authentication occurs, a refreshed NewSessionTicket "
433 "message is sent to the client."
434 msgstr ""
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable
438 msgid ""
439 "Post-handshake authentication cannot be used with QUIC. "
440 "\\&B<SSL_set_post_handshake_auth()> has no effect if called on a QUIC SSL "
441 "object."
442 msgstr ""
443
444 #. type: IX
445 #: archlinux debian-trixie debian-unstable
446 #, no-wrap
447 msgid "BUGS"
448 msgstr ""
449
450 #. type: Plain text
451 #: archlinux debian-trixie debian-unstable
452 msgid ""
453 "In client mode, it is not checked whether the SSL_VERIFY_PEER flag is set, "
454 "but whether any flags other than SSL_VERIFY_NONE are set. This can lead to "
455 "unexpected behaviour if SSL_VERIFY_PEER and other flags are not used as "
456 "required."
457 msgstr ""
458
459 #. type: IX
460 #: archlinux debian-trixie debian-unstable
461 #, no-wrap
462 msgid "RETURN VALUES"
463 msgstr ""
464
465 #. type: Plain text
466 #: archlinux debian-trixie debian-unstable
467 msgid "The SSL*_set_verify*() functions do not provide diagnostic information."
468 msgstr ""
469
470 #. type: Plain text
471 #: archlinux debian-trixie debian-unstable
472 msgid ""
473 "The B<SSL_verify_client_post_handshake()> function returns 1 if the request "
474 "succeeded, and 0 if the request failed. The error stack can be examined to "
475 "determine the failure reason."
476 msgstr ""
477
478 #. type: IX
479 #: archlinux debian-trixie debian-unstable
480 #, no-wrap
481 msgid "EXAMPLES"
482 msgstr ""
483
484 #. type: Plain text
485 #: archlinux debian-trixie debian-unstable
486 msgid ""
487 "The following code sequence realizes an example B<verify_callback> function "
488 "that will always continue the TLS/SSL handshake regardless of verification "
489 "failure, if wished. The callback realizes a verification depth limit with "
490 "more informational output."
491 msgstr ""
492
493 #. type: Plain text
494 #: archlinux debian-trixie debian-unstable
495 msgid ""
496 "All verification errors are printed; information about the certificate chain "
497 "is printed on request. The example is realized for a server that does allow "
498 "but not require client certificates."
499 msgstr ""
500
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable
503 msgid ""
504 "The example makes use of the ex_data technique to store application data "
505 "into/retrieve application data from the SSL structure (see "
506 "B<CRYPTO_get_ex_new_index>\\|(3), \\&B<SSL_get_ex_data_X509_STORE_CTX_idx>\\|"
507 "(3))."
508 msgstr ""
509
510 #. type: Plain text
511 #: archlinux debian-trixie debian-unstable
512 #, no-wrap
513 msgid ""
514 "\\& ...\n"
515 "\\& typedef struct {\n"
516 "\\& int verbose_mode;\n"
517 "\\& int verify_depth;\n"
518 "\\& int always_continue;\n"
519 "\\& } mydata_t;\n"
520 "\\& int mydata_index;\n"
521 "\\&\n"
522 "\\& ...\n"
523 "\\& static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)\n"
524 "\\& {\n"
525 "\\& char buf[256];\n"
526 "\\& X509 *err_cert;\n"
527 "\\& int err, depth;\n"
528 "\\& SSL *ssl;\n"
529 "\\& mydata_t *mydata;\n"
530 "\\&\n"
531 "\\& err_cert = X509_STORE_CTX_get_current_cert(ctx);\n"
532 "\\& err = X509_STORE_CTX_get_error(ctx);\n"
533 "\\& depth = X509_STORE_CTX_get_error_depth(ctx);\n"
534 "\\&\n"
535 "\\& /*\n"
536 "\\& * Retrieve the pointer to the SSL of the connection currently treated\n"
537 "\\& * and the application specific data stored into the SSL object.\n"
538 "\\& */\n"
539 "\\& ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());\n"
540 "\\& mydata = SSL_get_ex_data(ssl, mydata_index);\n"
541 "\\&\n"
542 "\\& X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256);\n"
543 "\\&\n"
544 "\\& /*\n"
545 "\\& * Catch a too long certificate chain. The depth limit set using\n"
546 "\\& * SSL_CTX_set_verify_depth() is by purpose set to \"limit+1\" so\n"
547 "\\& * that whenever the \"depthE<gt>verify_depth\" condition is met, we\n"
548 "\\& * have violated the limit and want to log this error condition.\n"
549 "\\& * We must do it here, because the CHAIN_TOO_LONG error would not\n"
550 "\\& * be found explicitly; only errors introduced by cutting off the\n"
551 "\\& * additional certificates would be logged.\n"
552 "\\& */\n"
553 "\\& if (depth E<gt> mydata-E<gt>verify_depth) {\n"
554 "\\& preverify_ok = 0;\n"
555 "\\& err = X509_V_ERR_CERT_CHAIN_TOO_LONG;\n"
556 "\\& X509_STORE_CTX_set_error(ctx, err);\n"
557 "\\& }\n"
558 "\\& if (!preverify_ok) {\n"
559 "\\& printf(\"verify error:num=%d:%s:depth=%d:%s\\en\", err,\n"
560 "\\& X509_verify_cert_error_string(err), depth, buf);\n"
561 "\\& } else if (mydata-E<gt>verbose_mode) {\n"
562 "\\& printf(\"depth=%d:%s\\en\", depth, buf);\n"
563 "\\& }\n"
564 "\\&\n"
565 "\\& /*\n"
566 "\\& * At this point, err contains the last verification error. We can use\n"
567 "\\& * it for something special\n"
568 "\\& */\n"
569 "\\& if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {\n"
570 "\\& X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, 256);\n"
571 "\\& printf(\"issuer= %s\\en\", buf);\n"
572 "\\& }\n"
573 "\\&\n"
574 "\\& if (mydata-E<gt>always_continue)\n"
575 "\\& return 1;\n"
576 "\\& else\n"
577 "\\& return preverify_ok;\n"
578 "\\& }\n"
579 "\\& ...\n"
580 "\\&\n"
581 "\\& mydata_t mydata;\n"
582 "\\&\n"
583 "\\& ...\n"
584 "\\& mydata_index = SSL_get_ex_new_index(0, \"mydata index\", NULL, NULL, NULL);\n"
585 "\\&\n"
586 "\\& ...\n"
587 "\\& SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE,\n"
588 "\\& verify_callback);\n"
589 "\\&\n"
590 "\\& /*\n"
591 "\\& * Let the verify_callback catch the verify_depth error so that we get\n"
592 "\\& * an appropriate error in the logfile.\n"
593 "\\& */\n"
594 "\\& SSL_CTX_set_verify_depth(verify_depth + 1);\n"
595 "\\&\n"
596 "\\& /*\n"
597 "\\& * Set up the SSL specific data into \"mydata\" and store it into th SSL\n"
598 "\\& * structure.\n"
599 "\\& */\n"
600 "\\& mydata.verify_depth = verify_depth; ...\n"
601 "\\& SSL_set_ex_data(ssl, mydata_index, &mydata);\n"
602 "\\&\n"
603 "\\& ...\n"
604 "\\& SSL_accept(ssl); /* check of success left out for clarity */\n"
605 "\\& if (peer = SSL_get_peer_certificate(ssl)) {\n"
606 "\\& if (SSL_get_verify_result(ssl) == X509_V_OK) {\n"
607 "\\& /* The client sent a certificate which verified OK */\n"
608 "\\& }\n"
609 "\\& }\n"
610 msgstr ""
611
612 #. type: IX
613 #: archlinux debian-trixie debian-unstable
614 #, no-wrap
615 msgid "SEE ALSO"
616 msgstr ""
617
618 #. type: Plain text
619 #: archlinux debian-trixie debian-unstable
620 msgid ""
621 "\\&B<ssl>\\|(7), B<SSL_new>\\|(3), \\&B<SSL_CTX_get_verify_mode>\\|(3), "
622 "\\&B<SSL_get_verify_result>\\|(3), \\&B<SSL_CTX_load_verify_locations>\\|"
623 "(3), \\&B<SSL_get_peer_certificate>\\|(3), "
624 "\\&B<SSL_CTX_set_cert_verify_callback>\\|(3), "
625 "\\&B<SSL_get_ex_data_X509_STORE_CTX_idx>\\|(3), "
626 "\\&B<SSL_CTX_set_client_cert_cb>\\|(3), \\&B<CRYPTO_get_ex_new_index>\\|(3)"
627 msgstr ""
628
629 #. type: IX
630 #: archlinux debian-trixie debian-unstable
631 #, no-wrap
632 msgid "HISTORY"
633 msgstr ""
634
635 #. type: Plain text
636 #: archlinux debian-trixie debian-unstable
637 msgid ""
638 "The SSL_VERIFY_POST_HANDSHAKE option, and the "
639 "B<SSL_verify_client_post_handshake()> and B<SSL_set_post_handshake_auth()> "
640 "functions were added in OpenSSL 1.1.1."
641 msgstr ""
642
643 #. type: IX
644 #: archlinux debian-trixie debian-unstable
645 #, no-wrap
646 msgid "COPYRIGHT"
647 msgstr ""
648
649 #. type: Plain text
650 #: archlinux debian-trixie debian-unstable
651 msgid "Copyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved."
652 msgstr ""
653
654 #. type: Plain text
655 #: archlinux debian-trixie debian-unstable
656 msgid ""
657 "Licensed under the Apache License 2.0 (the \"License\"). You may not use "
658 "this file except in compliance with the License. You can obtain a copy in "
659 "the file LICENSE in the source distribution or at E<lt>https://"
660 "www.openssl.org/source/license.htmlE<gt>."
661 msgstr ""
662
663 #. ========================================================================
664 #. type: IX
665 #: debian-trixie debian-unstable
666 #, no-wrap
667 msgid "SSL_CTX_SET_VERIFY 3SSL"
668 msgstr ""
669
670 #. type: TH
671 #: debian-trixie
672 #, no-wrap
673 msgid "3.5.6"
674 msgstr ""
675
676 #. type: Plain text
677 #: debian-trixie debian-unstable
678 msgid ""
679 "The verification of certificates can be controlled by a set of logically "
680 "or'ed B<mode> flags:"
681 msgstr ""
682
683 #. type: Plain text
684 #: debian-trixie debian-unstable
685 msgid ""
686 "The certificate chain is checked starting with the deepest nesting level "
687 "(the root CA certificate) and worked upward to the peer's certificate. At "
688 "each level signatures and issuer attributes are checked. Whenever a "
689 "verification error is found, the error number is stored in B<x509_ctx> and "
690 "B<verify_callback> is called with B<preverify_ok>=0. By applying "
691 "X509_CTX_store_* functions B<verify_callback> can locate the certificate in "
692 "question and perform additional steps (see EXAMPLES). If no error is found "
693 "for a certificate, B<verify_callback> is called with B<preverify_ok>=1 "
694 "before advancing to the next level."
695 msgstr ""