From 933c9d00dad666cc1391560ff362e806070a37af Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 14 Oct 2012 12:38:58 +0000 Subject: [PATCH] reset ctx->num for CTR mode for FIPS EVP --- fips/utl/fips_enc.c | 1 + 1 file changed, 1 insertion(+) 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)); -- 2.25.1