From: Matt Caswell Date: Fri, 24 Feb 2017 14:08:06 +0000 (+0000) Subject: Add a SSL_SESSION_get_max_early_data() function X-Git-Tag: OpenSSL_1_1_1-pre1~2147 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fcc4757823a00ed21cd0b5fd90122eb4f249a10c;p=oweals%2Fopenssl.git Add a SSL_SESSION_get_max_early_data() function Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2737) --- diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 934bb23b18..0fd36a5768 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1438,6 +1438,7 @@ __owur int SSL_SESSION_has_ticket(const SSL_SESSION *s); __owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, size_t *len); +__owur uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s); __owur int SSL_copy_session_id(SSL *to, const SSL *from); __owur X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); __owur int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index cc9eeadc12..2e69176b8f 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -902,6 +902,11 @@ void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, *tick = s->ext.tick; } +uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s) +{ + return s->ext.max_early_data; +} + X509 *SSL_SESSION_get0_peer(SSL_SESSION *s) { return s->peer; diff --git a/util/libssl.num b/util/libssl.num index 1d59a60dd0..471180160f 100644 --- a/util/libssl.num +++ b/util/libssl.num @@ -432,3 +432,4 @@ SSL_write_early 432 1_1_1 EXIST::FUNCTION: SSL_write_early_finish 433 1_1_1 EXIST::FUNCTION: SSL_read_early 434 1_1_1 EXIST::FUNCTION: SSL_get_early_data_status 435 1_1_1 EXIST::FUNCTION: +SSL_SESSION_get_max_early_data 436 1_1_1 EXIST::FUNCTION: