Fix incorrect default keysize for CAST ofb and cfb modes.
authorShane Lontis <shane.lontis@oracle.com>
Sat, 2 May 2020 03:51:35 +0000 (13:51 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Mon, 4 May 2020 23:38:08 +0000 (09:38 +1000)
commit95cf64404cabac96f32e72b5673e2702627e6b4c
tree7bcd8aaec10d7c195b520778895bd001279bc8a1
parentb756626a3732869875c50f150bddacfbcac5a7ab
Fix incorrect default keysize for CAST ofb and cfb modes.

Fixes #11459

It was incorrectly using 8 bytes instead of 16 as the default.
This was verified by expanding the macros used in e_cast.c.
The issue occurs if EVP_CIPHER_CTX_set_key_length() is not called.
evp_test.c hides this issue as it always calls EVP_CIPHER_CTX_set_key_length() before
using EVP_CipherInit_ex(...., key, ..).

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11707)
providers/implementations/ciphers/cipher_cast5.c
providers/implementations/include/prov/implementations.h
providers/legacyprov.c