From: "flichtenheld (Code Review)" Date: Fri, 6 Sep 2024 11:55:12 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <9c69a319f625bc0da974cfa599bef4076499f47c-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="LWBVfnT8lUg="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: crypto_openssl: Suppress deprecation warnings with OpenSSL 3 for GCC ... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --LWBVfnT8lUg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/735?usp=3Demail to review the following change. Change subject: crypto_openssl: Suppress deprecation warnings with OpenSSL = 3 for GCC as well ...................................................................... crypto_openssl: Suppress deprecation warnings with OpenSSL 3 for GCC as well When a user explicitly wants to use OpenSSL engine support with OpenSSL 3 (we will disable it by default), then allow them to use -Werror. We already had code for MSVC, add GCC as well. Change-Id: I37a3a316027197ab336f05a0ee674310fc3df57d Signed-off-by: Frank Lichtenheld --- M src/openvpn/crypto_openssl.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/35/735/1 diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index fbd38f3..295fd47 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -61,9 +61,14 @@ #error Windows build with OPENSSL_NO_EC: disabling EC key is not supported. #endif +#if HAVE_OPENSSL_ENGINE && OPENSSL_VERSION_NUMBER >=3D 0x30000000L +/* mute ossl3 deprecation warnings */ #ifdef _MSC_VER -/* mute ossl3 deprecation warnings treated as errors in msvc */ #pragma warning(disable: 4996) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif #endif /* @@ -1454,4 +1459,12 @@ return false; } #endif /* if LIBRESSL_VERSION_NUMBER */ + +#if HAVE_OPENSSL_ENGINE && OPENSSL_VERSION_NUMBER >=3D 0x30000000L +/* mute ossl3 deprecation warnings */ +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif +#endif + #endif /* ENABLE_CRYPTO_OPENSSL */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/735?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I37a3a316027197ab336f05a0ee674310fc3df57d Gerrit-Change-Number: 735 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --LWBVfnT8lUg= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

Vi= ew Change

crypto_openssl: Suppress deprecation warnings with OpenSSL 3 =
for GCC as well

When a user explicitly wants to use OpenSSL engine s= upport with
OpenSSL 3 (we will disable it by default), then allow them t= o use
-Werror.

We already had code for MSVC, add GCC as well.
=
Change-Id: I37a3a316027197ab336f05a0ee674310fc3df57d
Signed-off-by: = Frank Lichtenheld <frank@...2641...>
---
M src/openvpn/crypto_o= penssl.c
1 file changed, 14 insertions(+), 1 deletion(-)

git p= ull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/35/735/1
di=
ff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c
index fbd38f3..295fd47 100644
--- a/src/openvpn= /crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c=
@@ -61,9 +61,14 @@
#error Windows build with OPE= NSSL_NO_EC: disabling EC key is not supported.
#endif

+#if HA= VE_OPENSSL_ENGINE && OPENSSL_VERSION_NUMBER >=3D 0x30000000L
+/* mute ossl3 deprecati= on warnings */
#ifdef _MSC_VER
-/* mute ossl3 deprecation warnings treated as err= ors in msvc */
#pragma warning(disable: 4996)
+#else

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-= Wdeprecated-declarations"
+#endif
#endif

/*

@@ -1454,4 +1459,12 @@
return fal= se;
}
#endif /* if LIBRESSL_VERSION_NUMBE= R */
+
+#if HAVE_OPENSSL_ENGINE &&= OPENSSL_VERSION_NUMBER >=3D 0x30000000L

+/* mute ossl3 deprecation warnings */
+#ifndef _MSC_VER
+#pragma GCC diagnostic pop+#endif
+#endif
+
#endif /* ENABLE_CRYPTO_OPENSSL */

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

<= /div>
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I37a3a316027197ab336f05a0ee6= 74310fc3df57d
Gerrit-Change-Number: 735
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--LWBVfnT8lUg=--