reset ctx->num for CTR mode for FIPS EVP
This commit is contained in:
parent
aaf8b56fc8
commit
933c9d00da
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue