aboutsummaryrefslogtreecommitdiff
path: root/crypto/evp/evp_locl.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-02-15 19:40:16 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-02-15 19:40:16 +0000
commit1458b931ebfd9973643dc57e7d02a71749d0b910 (patch)
tree8563f7f1c41d0b811e1a2d80ff5a2d465c8cee91 /crypto/evp/evp_locl.h
parent20eb7238cbe104c4826d428e078cb912aedc4075 (diff)
downloadopenssl-1458b931ebfd9973643dc57e7d02a71749d0b910.zip
openssl-1458b931ebfd9973643dc57e7d02a71749d0b910.tar.gz
openssl-1458b931ebfd9973643dc57e7d02a71749d0b910.tar.bz2
The "block length" for CFB mode was incorrectly coded as 1 all the time. It
should be the number of feedback bits expressed in bytes. For CFB1 mode set this to 1 by rounding up to the nearest multiple of 8.
Diffstat (limited to 'crypto/evp/evp_locl.h')
-rw-r--r--crypto/evp/evp_locl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h
index 1b6c811..ff0f3c1 100644
--- a/crypto/evp/evp_locl.h
+++ b/crypto/evp/evp_locl.h
@@ -155,9 +155,9 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, kstruct, nid, block_size, key_len, \
#define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \
iv_len, cbits, flags, init_key, cleanup, \
set_asn1, get_asn1, ctrl) \
-BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \
- key_len, iv_len, flags, init_key, cleanup, set_asn1, \
- get_asn1, ctrl)
+BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, \
+ (cbits + 7)/8, key_len, iv_len, \
+ flags, init_key, cleanup, set_asn1, get_asn1, ctrl)
#define BLOCK_CIPHER_def_ofb(cname, kstruct, nid, key_len, \
iv_len, cbits, flags, init_key, cleanup, \