diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2020-09-19 10:05:01 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2020-09-19 10:05:01 +0000 |
commit | 0612c09b97582f30cdf4e98de92bca63fe392035 (patch) | |
tree | 2b9746f2c91517da01a2fd65603e0cd20f928993 /lib | |
parent | 759cc06a30411fd14909f711953182c60249cf91 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/ssl.h | 11 | ||||
-rw-r--r-- | lib/libssl/ssl_lib.c | 25 |
2 files changed, 34 insertions, 2 deletions
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h index 401c9cf8436..b01c426c9c2 100644 --- a/lib/libssl/ssl.h +++ b/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/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index c184f75abe5..3c62f39a571 100644 --- a/lib/libssl/ssl_lib.c +++ b/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) { |