]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/evp/e_cfb_bf.c
Beginnings of EVP cipher overhaul. This should eventually
[thirdparty/openssl.git] / crypto / evp / e_cfb_bf.c
index 63e1e624ea20ff94fecb12c4f32298fd4aeea7cf..b09485531f69b2cff4301c5a87509e3d17029ec2 100644 (file)
@@ -70,6 +70,7 @@ static EVP_CIPHER bfish_cfb_cipher=
        {
        NID_bf_cfb64,
        1,EVP_BLOWFISH_KEY_SIZE,8,
+       EVP_CIPH_CFB_MODE | EVP_CIPH_VARIABLE_LENGTH,
        bf_cfb_init_key,
        bf_cfb_cipher,
        NULL,
@@ -77,6 +78,7 @@ static EVP_CIPHER bfish_cfb_cipher=
                sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
        EVP_CIPHER_set_asn1_iv,
        EVP_CIPHER_get_asn1_iv,
+       NULL
        };
 
 EVP_CIPHER *EVP_bf_cfb(void)
@@ -93,7 +95,7 @@ static void bf_cfb_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_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,