From: Dr. Stephen Henson Date: Sun, 14 Oct 2012 12:38:58 +0000 (+0000) Subject: reset ctx->num for CTR mode for FIPS EVP X-Git-Tag: OpenSSL-fips-2_0-pl1~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=933c9d00dad666cc1391560ff362e806070a37af;p=oweals%2Fopenssl.git reset ctx->num for CTR mode for FIPS EVP --- diff --git a/fips/utl/fips_enc.c b/fips/utl/fips_enc.c index 1358b1f4a4..13ac4ac9f5 100644 --- a/fips/utl/fips_enc.c +++ b/fips/utl/fips_enc.c @@ -208,6 +208,7 @@ int FIPS_cipherinit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, break; case EVP_CIPH_CTR_MODE: + ctx->num = 0; /* Don't reuse IV for CTR mode */ if(iv) memcpy(ctx->iv, iv, M_EVP_CIPHER_CTX_iv_length(ctx));