diff options
Diffstat (limited to 'crypto/evp/e_cbc_bf.c')
-rw-r--r-- | crypto/evp/e_cbc_bf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/evp/e_cbc_bf.c b/crypto/evp/e_cbc_bf.c index 9bcba3c516..489e63041d 100644 --- a/crypto/evp/e_cbc_bf.c +++ b/crypto/evp/e_cbc_bf.c @@ -70,6 +70,7 @@ static EVP_CIPHER bfish_cbc_cipher= { NID_bf_cbc, 8,EVP_BLOWFISH_KEY_SIZE,8, + EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH, bf_cbc_init_key, bf_cbc_cipher, NULL, @@ -77,6 +78,7 @@ static EVP_CIPHER bfish_cbc_cipher= sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, + NULL }; EVP_CIPHER *EVP_bf_cbc(void) @@ -91,7 +93,7 @@ static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, memcpy(&(ctx->oiv[0]),iv,8); memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); if (key != NULL) - BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); + BF_set_key(&(ctx->c.bf_ks),EVP_CIPHER_CTX_key_length(ctx),key); } static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |