Add SSL_SESSION_set_max_early_data()
authorMatt Caswell <matt@openssl.org>
Sat, 8 Jul 2017 10:42:55 +0000 (11:42 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 31 Aug 2017 14:02:58 +0000 (15:02 +0100)
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/3926)

include/openssl/ssl.h
ssl/ssl_sess.c
util/libssl.num

index 237c086baeca236710a301c1de14a85c8d275392..077e8513b0f0dc2dc92ebff61dba11f2aa91f0e3 100644 (file)
@@ -1542,6 +1542,8 @@ __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_SESSION_set_max_early_data(SSL_SESSION *s,
+                                          uint32_t max_early_data);
 __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,
index 575cd70ef036340bf6ef0e05884421a5884455dc..6292d011266258e7daca1f9b7f57ac60ce784c92 100644 (file)
@@ -929,6 +929,13 @@ uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s)
     return s->ext.max_early_data;
 }
 
+int SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data)
+{
+    s->ext.max_early_data = max_early_data;
+
+    return 1;
+}
+
 X509 *SSL_SESSION_get0_peer(SSL_SESSION *s)
 {
     return s->peer;
index d5774566e09353979b8729ca2f768950953040b4..f3d1baacb5c76c1c2f966b24a7c4da93d9acdc8a 100644 (file)
@@ -465,3 +465,4 @@ SSL_free_buffers                        465 1_1_1   EXIST::FUNCTION:
 SSL_SESSION_dup                         466    1_1_1   EXIST::FUNCTION:
 SSL_get_pending_cipher                  467    1_1_1   EXIST::FUNCTION:
 SSL_CIPHER_get_protocol_id              468    1_1_1   EXIST::FUNCTION:
+SSL_SESSION_set_max_early_data          469    1_1_1   EXIST::FUNCTION: