Make the input parameters for SSL_SESSION_set1_master_key const
authorMatt Caswell <matt@openssl.org>
Tue, 20 Jun 2017 13:24:39 +0000 (14:24 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 21 Jun 2017 13:45:36 +0000 (14:45 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3670)

doc/man3/SSL_get_client_random.pod
include/openssl/ssl.h
ssl/ssl_lib.c

index d6918f8..83a1027 100644 (file)
@@ -16,7 +16,7 @@ SSL_SESSION_set1_master_key
  size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, size_t outlen);
  size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
                                    unsigned char *out, size_t outlen);
- int SSL_SESSION_set1_master_key(SSL_SESSION *sess, unsigned char *in,
+ int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in,
                                  size_t len);
 
 =head1 DESCRIPTION
index c0d3904..75fb1fc 100644 (file)
@@ -1865,8 +1865,8 @@ __owur size_t SSL_get_server_random(const SSL *ssl, unsigned char *out,
                                     size_t outlen);
 __owur size_t SSL_SESSION_get_master_key(const SSL_SESSION *ssl,
                                          unsigned char *out, size_t outlen);
-__owur int SSL_SESSION_set1_master_key(SSL_SESSION *sess, unsigned char *in,
-                                       size_t len);
+__owur int SSL_SESSION_set1_master_key(SSL_SESSION *sess,
+                                       const unsigned char *in, size_t len);
 
 #define SSL_get_ex_new_index(l, p, newf, dupf, freef) \
     CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, l, p, newf, dupf, freef)
index db14e22..f9c7b44 100644 (file)
@@ -3725,7 +3725,7 @@ size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
     return outlen;
 }
 
-int SSL_SESSION_set1_master_key(SSL_SESSION *sess, unsigned char *in,
+int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in,
                                 size_t len)
 {
     if (len > sizeof(sess->master_key))