Skip to content

Commit a69d9b6

Browse files
schwabecron2
authored andcommitted
Do not try to use the encrypt-then-mac ciphers from OpenSSL 3.6.0
These ciphers claim to be CBC but since they are also include an HMAC are more a mix of AEAD and CBC. Nevertheless, we do not support these and also have no (good) reason to support them. This patch defines the flag if the SSL library does not define the flag to also work when the SSL library is upgraded after OpenVPN has been compiled. Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d Signed-off-by: Arne Schwabe <[email protected]> Acked-by: Frank Lichtenheld <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1294 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg33846.html Signed-off-by: Gert Doering <[email protected]>
1 parent 0abf6e7 commit a69d9b6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/openvpn/crypto_openssl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,8 @@ cipher_kt_mode_cbc(const char *ciphername)
789789
#ifdef EVP_CIPH_FLAG_CTS
790790
&& !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_CTS)
791791
#endif
792-
&& !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER));
792+
&& !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER)
793+
&& !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_ENC_THEN_MAC));
793794
EVP_CIPHER_free(cipher);
794795
return ret;
795796
}

src/openvpn/openssl_compat.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,9 @@ SSL_get0_group_name(SSL *s)
211211
#endif
212212
#endif
213213

214+
/* Introduced in OpenSSL 3.6.0 */
215+
#ifndef EVP_CIPH_FLAG_ENC_THEN_MAC
216+
#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
217+
#endif
218+
214219
#endif /* OPENSSL_COMPAT_H_ */

0 commit comments

Comments
 (0)