diff options
author | Matt Caswell <matt@openssl.org> | 2015-06-04 11:16:16 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-06-04 12:58:00 +0100 |
commit | 470446db9a0861b01cba33dd42062ecc5734df53 (patch) | |
tree | 73dcda4e896ad679e794c124bd7b64cb73694f07 | |
parent | 91e64e142770bc13145346a5e89e9d95bc3e22dd (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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 8d3244f9e4..7ebcca6d67 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -2664,6 +2664,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) |