diff options
author | Rich Salz <rsalz@openssl.org> | 2016-06-23 10:03:50 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-06-23 10:03:50 -0400 |
commit | fe2d149119063ec3c89fd6db9af8a6970e3e6032 (patch) | |
tree | 6ac31d6c991849b60ae7d1b5ded13558fcd2c5cc /crypto/evp/e_des3.c | |
parent | 615dd78b72a822b31ad17623afcf1293bfee3570 (diff) |
RT2867: des_ede3_cfb1 ignored "size in bits" flag
Code and tests by Steve.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/evp/e_des3.c')
-rw-r--r-- | crypto/evp/e_des3.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index e21c045307..a842913658 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -164,6 +164,8 @@ static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, size_t n; unsigned char c[1], d[1]; + if (!EVP_CIPHER_CTX_test_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS)) + inl *= 8; for (n = 0; n < inl; ++n) { c[0] = (in[n / 8] & (1 << (7 - n % 8))) ? 0x80 : 0; DES_ede3_cfb_encrypt(c, d, 1, 1, |