diff options
author | Benjamin Saunders <ben.e.saunders@gmail.com> | 2018-02-25 18:39:11 -0800 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-03-12 19:34:13 +0000 |
commit | 3fa2812f32bdb922d47b84ab7b5a98a807d838c0 (patch) | |
tree | ad6cd3c8463be1521456b004cd14811a3b0fc20b /apps/s_server.c | |
parent | 4718f449a3ecd5efac62b22d0fa9a759a7895dbc (diff) |
Introduce SSL_CTX_set_stateless_cookie_{generate,verify}_cb
These functions are similar to SSL_CTX_set_cookie_{generate,verify}_cb,
but used for the application-controlled portion of TLS1.3 stateless
handshake cookies rather than entire DTLSv1 cookies.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5463)
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index bc1d1e5608..d21631e8e6 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2038,6 +2038,10 @@ int s_server_main(int argc, char *argv[]) SSL_CTX_set_cookie_generate_cb(ctx, generate_cookie_callback); SSL_CTX_set_cookie_verify_cb(ctx, verify_cookie_callback); + /* Set TLS1.3 cookie generation and verification callbacks */ + SSL_CTX_set_stateless_cookie_generate_cb(ctx, generate_stateless_cookie_callback); + SSL_CTX_set_stateless_cookie_verify_cb(ctx, verify_stateless_cookie_callback); + if (ctx2 != NULL) { SSL_CTX_set_verify(ctx2, s_server_verify, verify_callback); if (!SSL_CTX_set_session_id_context(ctx2, |