From: Dmitry Belyavskiy Date: Wed, 2 Jan 2019 10:28:07 +0000 (+0300) Subject: Remove unused variables from tls1_change_cipher_state X-Git-Tag: OpenSSL_1_1_1b~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bb61be393f87ca1c1fad8dfed8c40a4da9d06448;p=oweals%2Fopenssl.git Remove unused variables from tls1_change_cipher_state Reviewed-by: Tim Hudson Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/7971) (cherry picked from commit d072eea2e39c4444ecce3598556053a4c552d9a2) --- diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 2db913fb06..ac8498646e 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -81,10 +81,6 @@ static int tls1_generate_key_block(SSL *s, unsigned char *km, size_t num) int tls1_change_cipher_state(SSL *s, int which) { unsigned char *p, *mac_secret; - unsigned char tmp1[EVP_MAX_KEY_LENGTH]; - unsigned char tmp2[EVP_MAX_KEY_LENGTH]; - unsigned char iv1[EVP_MAX_IV_LENGTH * 2]; - unsigned char iv2[EVP_MAX_IV_LENGTH * 2]; unsigned char *ms, *key, *iv; EVP_CIPHER_CTX *dd; const EVP_CIPHER *c; @@ -334,16 +330,8 @@ int tls1_change_cipher_state(SSL *s, int which) printf("\n"); #endif - OPENSSL_cleanse(tmp1, sizeof(tmp1)); - OPENSSL_cleanse(tmp2, sizeof(tmp1)); - OPENSSL_cleanse(iv1, sizeof(iv1)); - OPENSSL_cleanse(iv2, sizeof(iv2)); return 1; err: - OPENSSL_cleanse(tmp1, sizeof(tmp1)); - OPENSSL_cleanse(tmp2, sizeof(tmp1)); - OPENSSL_cleanse(iv1, sizeof(iv1)); - OPENSSL_cleanse(iv2, sizeof(iv2)); return 0; }