1SSL_CTX_SET_STATELESS_COOKIE_GENERATSEOS_pLCe_BnC(ST3SX)L_SET_STATELESS_COOKIE_GENERATE_CB(3)
2
3
4

NAME

6       SSL_CTX_set_stateless_cookie_generate_cb,
7       SSL_CTX_set_stateless_cookie_verify_cb - Callback functions for
8       stateless TLS1.3 cookies
9

SYNOPSIS

11        #include <openssl/ssl.h>
12
13        void SSL_CTX_set_stateless_cookie_generate_cb(
14            SSL_CTX *ctx,
15            int (*gen_stateless_cookie_cb) (SSL *ssl,
16                                            unsigned char *cookie,
17                                            size_t *cookie_len));
18        void SSL_CTX_set_stateless_cookie_verify_cb(
19            SSL_CTX *ctx,
20            int (*verify_stateless_cookie_cb) (SSL *ssl,
21                                               const unsigned char *cookie,
22                                               size_t cookie_len));
23

DESCRIPTION

25       SSL_CTX_set_cookie_generate_cb() sets the callback used by
26       SSL_stateless(3) to generate the application-controlled portion of the
27       cookie provided to clients in the HelloRetryRequest transmitted as a
28       response to a ClientHello with a missing or invalid cookie.
29       gen_stateless_cookie_cb() must write at most SSL_COOKIE_LENGTH bytes
30       into cookie, and must write the number of bytes written to cookie_len.
31       If a cookie cannot be generated, a zero return value can be used to
32       abort the handshake.
33
34       SSL_CTX_set_cookie_verify_cb() sets the callback used by
35       SSL_stateless(3) to determine whether the application-controlled
36       portion of a ClientHello cookie is valid. A nonzero return value from
37       app_verify_cookie_cb() communicates that the cookie is valid. The
38       integrity of the entire cookie, including the application-controlled
39       portion, is automatically verified by HMAC before
40       verify_stateless_cookie_cb() is called.
41

RETURN VALUES

43       Neither function returns a value.
44

SEE ALSO

46       SSL_stateless(3)
47
49       Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
50
51       Licensed under the OpenSSL license (the "License").  You may not use
52       this file except in compliance with the License.  You can obtain a copy
53       in the file LICENSE in the source distribution or at
54       <https://www.openssl.org/source/license.html>.
55
56
57
581.1.1                             20S1S8L-_0C9T-X1_1SET_STATELESS_COOKIE_GENERATE_CB(3)
Impressum