]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Do not allow CTS ciphers
authorArne Schwabe <arne@rfc2549.org>
Tue, 19 Oct 2021 18:31:21 +0000 (20:31 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 26 Oct 2021 17:27:47 +0000 (19:27 +0200)
We do not support CTS algorithms (cipher text stealing) algorithms.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Max Fillinger <maximilian.fillinger@foxcrypto.com>
Message-Id: <20211019183127.614175-16-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23002.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/crypto_openssl.c

index c8fe0d0f245c562c623175867d6755d4d77e9370..d4792f46210c197dfa1faf127cd6acba1f541489 100644 (file)
@@ -708,6 +708,9 @@ cipher_kt_mode_cbc(const cipher_kt_t *cipher)
 {
     return cipher && cipher_kt_mode(cipher) == OPENVPN_MODE_CBC
            /* Exclude AEAD cipher modes, they require a different API */
+#ifdef EVP_CIPH_FLAG_CTS
+           && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_CTS)
+#endif
            && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER);
 }