Add SSL_SESSION_set_cipher()
authorMatt Caswell <matt@openssl.org>
Mon, 12 Jun 2017 18:12:04 +0000 (19:12 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 21 Jun 2017 13:45:35 +0000 (14:45 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3670)

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

index bf01f60cd3ccb02ba6bd995e59d7e0332ff1d3e6..13dd59c833d5ffe4e89ebe52bcadf5d34cfd744e 100644 (file)
@@ -1508,6 +1508,7 @@ __owur long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
 __owur int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
 __owur const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s);
 __owur const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s);
+__owur int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher);
 __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,
index c7bbc96e4cf9a399ddb8ce99bff9c1c93720c870..2b3d2f770ac74f54c7dde304b67650aaaa7cd7dd 100644 (file)
@@ -863,6 +863,12 @@ const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s)
     return s->cipher;
 }
 
+int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher)
+{
+    s->cipher = cipher;
+    return 1;
+}
+
 const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s)
 {
     return s->ext.hostname;
index 25e0750e1a2521bb55dce24632bc91be2227a59d..db5de71995e3f3dc8612e491e74148efeab33ea8 100644 (file)
@@ -457,3 +457,4 @@ SSL_CTX_set_psk_use_session_callback    457 1_1_1   EXIST::FUNCTION:
 SSL_CTX_set_psk_find_session_callback   458    1_1_1   EXIST::FUNCTION:
 SSL_CIPHER_get_handshake_digest         459    1_1_1   EXIST::FUNCTION:
 SSL_SESSION_set1_master_key             460    1_1_1   EXIST::FUNCTION:
+SSL_SESSION_set_cipher                  461    1_1_1   EXIST::FUNCTION: