From: "plaisthos (Code Review)" Date: Thu, 23 Oct 2025 09:56:04 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <19ac9f045dc72c1baa4f968b59f1c66a3b4930a3-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="LDGdSUlpdqE="; 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: flichtenheld Cc: openvpn-devel --LDGdSUlpdqE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld,=20 I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1294?usp=3Demail to look at the new patch set (#3). 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 --- 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/94/1294/3 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: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Iafe3c94b952cd3fbecf6f3d05816e5859f425e7d Gerrit-Change-Number: 1294 Gerrit-PatchSet: 3 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld --LDGdSUlpdqE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld.

plaisthos uploaded patch set #3 to this change.

<= a href=3D"http://gerrit.openvpn.net/c/openvpn/+/1294?usp=3Demail">View Chan= ge

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.

Th= is 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 <arne@...1227...>
---
M src/openvpn/crypto_op= enssl.c
M src/openvpn/openssl_compat.h
2 files changed, 7 insertions(= +), 1 deletion(-)

git pull ssh://gerrit.openvpn.=
net:29418/openvpn refs/changes/94/1294/3
diff --git a/src/openvpn/c=
rypto_openssl.c b/src/openvpn/crypto_openssl.c
index 7688ad= d..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_CIPHER));
+ = && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AE= AD_CIPHER)
+ = && !(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_ENC_THE= N_MAC));
EVP_CIPHER_free(cipher);
= return ret;
}
diff --git a/src/openvpn/op= enssl_compat.h b/src/openvpn/openssl_compat.h
index e3e7cf8= ..fb3c9b1 100644
--- a/src/openvpn/openssl_compat.h<= br>+++ b/src/openvpn/openssl_compat.h
@@ -211,4 +211,= 9 @@
#endif
#endif

+/* Introduced in OpenSSL= 3.6.0 */
+#ifndef EV= P_CIPH_FLAG_ENC_THEN_MAC
+#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
+#endif
+
#endif /* OPENSSL_COMPAT_H_ */

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

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iafe3c94b952cd3fbecf6f3d0581= 6e5859f425e7d
Gerrit-Change-Number: 1294
Gerrit-PatchSet: 3
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...>
= --LDGdSUlpdqE=--