From: "cron2 (Code Review)" Date: Thu, 23 Oct 2025 15:46:34 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <54bffb623efb046b20b4f289ec3fa5a0b35496e8-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="vOCo/tefplc="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Do not try to use the encrypt-then-mac ciphers from OpenSSL 3.6.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --vOCo/tefplc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/12= 94?usp=3Demail ) Change subject: Do not try to use the encrypt-then-mac ciphers from OpenSSL= 3.6.0 ...................................................................... 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 compil= ed. Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1294 Message-Id: <20251023111138.25245-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33= 846.html Signed-off-by: Gert Doering --- M src/openvpn/crypto_openssl.c M src/openvpn/openssl_compat.h 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index 7688add..f596b8c 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -789,7 +789,8 @@ #ifdef EVP_CIPH_FLAG_CTS && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_CTS) #endif - && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPH= ER)); + && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPH= ER) + && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_ENC_THEN_= MAC)); EVP_CIPHER_free(cipher); return ret; } diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index e3e7cf8..fb3c9b1 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -211,4 +211,9 @@ #endif #endif +/* Introduced in OpenSSL 3.6.0 */ +#ifndef EVP_CIPH_FLAG_ENC_THEN_MAC +#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000 +#endif + #endif /* OPENSSL_COMPAT_H_ */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1294?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d Gerrit-Change-Number: 1294 Gerrit-PatchSet: 4 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel --vOCo/tefplc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

Do not try to use the encrypt-then-mac ciphers f=
rom OpenSSL 3.6.0

These ciphers claim to be CBC but since they are a= lso 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 flagto also work when the SSL library is upgraded after OpenVPN has been compi= led.

Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d
Signed-= off-by: Arne Schwabe <arne@...1227...>
Acked-by: Frank Lichtenheld= <frank@...2641...>
Gerrit URL: https://gerrit.openvpn.net/c/openv= pn/+/1294
Message-Id: <20251023111138.25245-1-gert@...1296...>
= URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33= 846.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M= src/openvpn/crypto_openssl.c
M src/openvpn/openssl_compat.h
2 files = changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c=

index 7688add..f596b8c 100644
--- a/src/op= envpn/crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c
@@ -789,7 +789,8 @@
#ifdef EVP_CIPH_FLAG_CT= S
&& !(EVP_CIPHER_flags(cipher)= & EVP_CIPH_FLAG_CTS)
#endif
- && !(EVP_CIPHER_flag= s(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER));
+ && !(EVP_CIPHER_flags(c= ipher) & EVP_CIPH_FLAG_AEAD_CIPHER)
+ && !(EVP_CIPHER_flags(cipher= ) & EVP_CIPH_FLAG_ENC_THEN_MAC));
EVP_CIPHER_free(= cipher);
return ret;
}
diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h<= /span>
index e3e7cf8..fb3c9b1 100644
--- a/src/ope= nvpn/openssl_compat.h
+++ b/src/openvpn/openssl_compat.h
@@ -211,4 +211,9 @@
#endif
= #endif

+/* Introduced in OpenSSL 3.6.0 */
+#ifndef EVP_CIPH_FLAG_ENC_THEN_MAC
+#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x1000= 0000
+#endif+
#endif /* = OPENSSL_COMPAT_H_ */

To view, visit change 1294= . To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iafe3c94b952cd3fbecf6f3d0581= 6e5859f425e7d
Gerrit-Change-Number: 1294
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --vOCo/tefplc=--