diff options
Diffstat (limited to 'crypto/evp/evp_enc.c')
-rw-r--r-- | crypto/evp/evp_enc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 31e590bd95..6d4e033816 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -241,7 +241,11 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, return 0; } - return ctx->cipher->einit(ctx->provctx, key, iv); + return ctx->cipher->einit(ctx->provctx, + key, + EVP_CIPHER_CTX_key_length(ctx), + iv, + EVP_CIPHER_CTX_iv_length(ctx)); } if (ctx->cipher->dinit == NULL) { @@ -249,7 +253,11 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, return 0; } - return ctx->cipher->dinit(ctx->provctx, key, iv); + return ctx->cipher->dinit(ctx->provctx, + key, + EVP_CIPHER_CTX_key_length(ctx), + iv, + EVP_CIPHER_CTX_iv_length(ctx)); /* TODO(3.0): Remove legacy code below */ legacy: |