EVP_*_cfb1 was broken [from HEAD].
authorAndy Polyakov <appro@openssl.org>
Sun, 8 Jul 2007 19:20:48 +0000 (19:20 +0000)
committerAndy Polyakov <appro@openssl.org>
Sun, 8 Jul 2007 19:20:48 +0000 (19:20 +0000)
PR: 1318

crypto/evp/evp_locl.h

index f5b71eed797d352d34be6bc5a3da08145d52abc4..6f6ce16c9ebc4867440b2c16b7e5aac9f829da1e 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;\
 }