From: "plaisthos (Code Review)" Date: Thu, 23 Oct 2025 11:20:00 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <1998de8c8fe98084639ba7332643497be72e4501-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="YlnTCB11+lA="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[release/2.6]: 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: flichtenheld Cc: openvpn-devel --YlnTCB11+lA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1295?usp=3Demail to review the following change. 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. Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d Signed-off-by: Arne Schwabe --- M src/openvpn/crypto_openssl.c M src/openvpn/openssl_compat.h 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/1295/1 diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index 331af99..280389c 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -798,7 +798,8 @@ #ifdef EVP_CIPH_FLAG_CTS && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_CT= S) #endif - && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AE= AD_CIPHER)); + && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AE= AD_CIPHER) + && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_EN= C_THEN_MAC)); EVP_CIPHER_free(cipher); return ret; } diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index c9fa719..03ece13 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -817,4 +817,9 @@ #endif /* OPENSSL_VERSION_NUMBER < 0x30000000L */ +/* 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/+/1295?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d Gerrit-Change-Number: 1295 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld --YlnTCB11+lA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

V= iew Change

Do not try to use the encrypt-then-mac ciph=
ers 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, w= e do not support these
and also have no (good) reason to support them.
Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d
Signed-off-by= : Arne Schwabe <arne@...1227...>
---
M src/openvpn/crypto_opens= sl.c
M src/openvpn/openssl_compat.h
2 files changed, 7 insertions(+),= 1 deletion(-)

git pull ssh://gerrit.openvpn.net=
:29418/openvpn refs/changes/95/1295/1
diff --git a/src/openvpn/cryp=
to_openssl.c b/src/openvpn/crypto_openssl.c
index 331af99..= 280389c 100644
--- a/src/openvpn/crypto_openssl.c+++ b/src/openvpn/crypto_openssl.c
@@ -798,7 +798,8 = @@
#ifdef EVP_CIPH_FLAG_CTS
= && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_CTS)=
#endif
+ && !(EVP_CIPHER_flags(cipher) &= ; EVP_CIPH_FLAG_AEAD_CIPHER)
+ && !(EVP_CIPHER_flags(cipher) &a= mp; EVP_CIPH_FLAG_ENC_THEN_MAC));
EVP_CIPHER_free(ciph= er);
return ret;
}
di= ff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
index c9fa719..03ece13 100644
--- a/src/openvpn= /openssl_compat.h
+++ b/src/openvpn/openssl_compat.h=
@@ -817,4 +817,9 @@

#endif /* = OPENSSL_VERSION_NUMBER < 0x30000000L */

+/* Introduced in OpenSSL 3.6.0 */<= /span>
+#ifndef EVP_CIPH_FLA= G_ENC_THEN_MAC
+#defi= ne EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
+#endif
+
#endif /* OPENSSL_COMPAT_H_ */

To view, visit change 1295. To unsubscribe, or for help writi= ng mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: Iafe3c94b952cd3fbecf6f3d0581= 6e5859f425e7d
Gerrit-Change-Number: 1295
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --YlnTCB11+lA=--