summaryrefslogtreecommitdiffstats
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 12:53:43 +0100
commitefd89aa9cc7ed1142be8a4baa49567170bc4626e (patch)
tree5223211d0dac69a853bf948d3b604c0bcb6161a9
parent4e3dbe37ca39fa68b6949fbde62f3ec0f0584f7e (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> (cherry picked from commit b7ee4815f2452c854cc859e8dda88f2673cdddea) Conflicts: ssl/s3_srvr.c
-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 de984c85d3..8885694c02 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -2902,6 +2902,7 @@ int ssl3_get_client_key_exchange(SSL *s)
s->
session->master_key,
premaster_secret, 32);
+ OPENSSL_cleanse(premaster_secret, sizeof(premaster_secret));
/* Check if pubkey from client certificate was used */
if (EVP_PKEY_CTX_ctrl
(pkey_ctx, -1, -1, EVP_PKEY_CTRL_PEER_KEY, 2, NULL) > 0)