EVP_*_cfb1 was broken.
authorAndy Polyakov <appro@openssl.org>
Sun, 8 Jul 2007 19:14:02 +0000 (19:14 +0000)
committerAndy Polyakov <appro@openssl.org>
Sun, 8 Jul 2007 19:14:02 +0000 (19:14 +0000)
PR: 1318

crypto/evp/evp_locl.h

index 26e11a3404b752ad50d1021294edddc828e00242..0ce0124908813a3e2baa6ff8e77a8449f5fb6753 100644 (file)
@@ -92,7 +92,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
 #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
 static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
 {\
-       cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
+       cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
        return 1;\
 }