From 6946a1a0fe28e7ca3594e290ba2654826ac23618 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 19 Sep 2020 10:05:00 +0000 Subject: Prepare to provide SSL{,_CTX}_{get,set}_max_early_data Similar to the SSL_SESSION versions, these are noops that are expected to be available by some configure tests. ok beck jsing --- src/lib/libssl/ssl.h | 11 ++++++++++- src/lib/libssl/ssl_lib.c | 25 ++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 401c9cf843..b01c426c9c 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.h,v 1.174 2020/09/19 09:56:34 tb Exp $ */ +/* $OpenBSD: ssl.h,v 1.175 2020/09/19 10:05:00 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1458,6 +1458,15 @@ int SSL_is_server(const SSL *s); int SSL_read(SSL *ssl, void *buf, int num); int SSL_peek(SSL *ssl, void *buf, int num); int SSL_write(SSL *ssl, const void *buf, int num); + +#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL) +uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx); +int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data); + +uint32_t SSL_get_max_early_data(const SSL *s); +int SSL_set_max_early_data(SSL *s, uint32_t max_early_data); +#endif + long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); long SSL_callback_ctrl(SSL *, int, void (*)(void)); long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index c184f75abe..3c62f39a57 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.230 2020/09/18 16:18:56 schwarze Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.231 2020/09/19 10:05:00 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1000,6 +1000,29 @@ SSL_write(SSL *s, const void *buf, int num) return ssl3_write(s, buf, num); } +uint32_t +SSL_CTX_get_max_early_data(const SSL_CTX *ctx) +{ + return 0; +} + +int +SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data) +{ + return 1; +} + +uint32_t +SSL_get_max_early_data(const SSL *s) +{ + return 0; +} + +int +SSL_set_max_early_data(SSL *s, uint32_t max_early_data) +{ + return 1; +} int SSL_shutdown(SSL *s) { -- cgit v1.2.3-55-g6feb