[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Kurt Roeckx
kurt at openssl.org
Mon Oct 30 21:51:46 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 5a3d24ad5af3a2fee1d5381bda5329c07b6328d8 (commit)
from 257a03ccb5f395a23bbf63b6fcdd024081b114c7 (commit)
- Log -----------------------------------------------------------------
commit 5a3d24ad5af3a2fee1d5381bda5329c07b6328d8
Author: Kurt Roeckx <kurt at roeckx.be>
Date: Sun Oct 29 15:13:43 2017 +0100
Only reset the ctx when a cipher is given
This restores the 1.0.2 behaviour
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Benjamin Kaduk <bkaduk at akamai.com>
GH: #4613
(cherry picked from commit ffd23209933ea0ad5543f15ca6303d63d8dac826)
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/evp_enc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index f829e8d..5ea14cd 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -50,7 +50,8 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
const unsigned char *key, const unsigned char *iv, int enc)
{
- EVP_CIPHER_CTX_reset(ctx);
+ if (cipher != NULL)
+ EVP_CIPHER_CTX_reset(ctx);
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
}
More information about the openssl-commits
mailing list