The branch master has been updated
via ffd23209933ea0ad5543f15ca6303d63d8dac826 (commit)
from 79204b9cd7bbaaf524de9bc83d96e2d320d7538c (commit)
- Log -----------------------------------------------------------------
commit ffd23209933ea0ad5543f15ca6303d63d8dac826
Author: Kurt Roeckx <[email protected]>
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 <[email protected]>
Reviewed-by: Benjamin Kaduk <[email protected]>
GH: #4613
-----------------------------------------------------------------------
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 d353084..f89cff6 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);
}
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits