summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-02-24 14:08:06 +0000
committerMatt Caswell <matt@openssl.org>2017-03-02 17:44:15 +0000
commitfcc4757823a00ed21cd0b5fd90122eb4f249a10c (patch)
treeb19ca7c4b3b40105aeec734cfb7db937582bceb7
parent7daf7156d8fb10e8ec18d806b653d425707c2c0d (diff)
Add a SSL_SESSION_get_max_early_data() function
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
-rw-r--r--include/openssl/ssl.h1
-rw-r--r--ssl/ssl_sess.c5
-rw-r--r--util/libssl.num1
3 files changed, 7 insertions, 0 deletions
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: