summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-06-04 11:16:16 +0100
committerMatt Caswell <matt@openssl.org>2015-06-04 11:20:51 +0100
commitb7ee4815f2452c854cc859e8dda88f2673cdddea (patch)
tree204c0f80f81663e5cfddaf5c261000afc3865390 /ssl
parentc56353071d9849220714d8a556806703771b9269 (diff)
Clean premaster_secret for GOST
Ensure OPENSSL_cleanse() is called on the premaster secret value calculated for GOST. With thanks to the Open Crypto Audit Project for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_srvr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 88e649d315..90a67d1105 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -2825,6 +2825,7 @@ int ssl3_get_client_key_exchange(SSL *s)
s->
session->master_key,
premaster_secret, 32);
+ OPENSSL_cleanse(premaster_secret, sizeof(premaster_secret));
if (s->session->master_key_length < 0) {
al = SSL_AD_INTERNAL_ERROR;
SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);