提交 725b0f1e 编写于 作者: M Matt Caswell

Make the input parameters for SSL_SESSION_set1_master_key const

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3670)
上级 8ead6158
......@@ -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
......
......@@ -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)
......
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册