RC4 is not a block cipher
authorMatt Caswell <matt@openssl.org>
Sat, 5 Oct 2019 01:42:32 +0000 (11:42 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Sat, 5 Oct 2019 01:42:32 +0000 (11:42 +1000)
RC4 is a stream cipher therefore EVP_CIPHER_CTX_block_size() should
return 1.

This fixes a test failure in ssl_test_old when enable-weak-ssl-ciphers
has been configured.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10090)

providers/default/ciphers/cipher_rc4.c

index 9418c141f6b2fc1327fe702ea6f5b21c0b9dae47..d81b776bc2bd09d5b9720b47b7d28a94aa5a5403 100644 (file)
@@ -82,6 +82,6 @@ const OSSL_DISPATCH alg##kbits##_functions[] = {                               \
 };
 
 /* rc440_functions */
-IMPLEMENT_cipher(rc4, RC4, EVP_CIPH_VARIABLE_LENGTH, 40, 64, 0, stream)
+IMPLEMENT_cipher(rc4, RC4, EVP_CIPH_VARIABLE_LENGTH, 40, 8, 0, stream)
 /* rc4128_functions */
-IMPLEMENT_cipher(rc4, RC4, EVP_CIPH_VARIABLE_LENGTH, 128, 64, 0, stream)
+IMPLEMENT_cipher(rc4, RC4, EVP_CIPH_VARIABLE_LENGTH, 128, 8, 0, stream)