add EVP_CIPH_FLAG_LENGTH_BITS from 0.9.8-stable
[openssl.git] / crypto / evp / evp_locl.h
index 300f4b4e94872e4d374302900b106c8b7a855ec2..465747471e323547b6a7c2b58bc13926ac7ba921 100644 (file)
@@ -1,5 +1,5 @@
 /* evp_locl.h */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2000.
  */
 /* ====================================================================
@@ -115,7 +115,7 @@ static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
        if (inl<chunk) chunk=inl;\
        while(inl && inl>=chunk)\
            {\
-           cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?chunk*8:chunk), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
+            cprefix##_cfb##cbits##_encrypt(in, out, (long)((cbits==1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
            inl-=chunk;\
            in +=chunk;\
            out+=chunk;\