From: Matt Caswell Date: Thu, 4 Jun 2015 10:16:16 +0000 (+0100) Subject: Clean premaster_secret for GOST X-Git-Tag: OpenSSL_1_0_0s~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=470446db9a0861b01cba33dd42062ecc5734df53;p=oweals%2Fopenssl.git 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 (cherry picked from commit b7ee4815f2452c854cc859e8dda88f2673cdddea) Conflicts: ssl/s3_srvr.c --- 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)