Skip to contentSkip to conversation

Change in openvpn[master]: crypto_openssl: Suppress deprecation warnings with OpenSSL 3 for GCC ...

Openvpn-devel flichtenheld (Code Review) 1 participant 3 messages Sep 6, 2024 – Sep 27, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1725623710000.I37a3a316027197ab336f05a0ee674310fc3df57d@...2715...

#1 lore raw

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=email

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

---
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

src/openvpn/crypto_openssl.c +14 -1
index fbd38f3..295fd47 100644
@@ -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 >= 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 >= 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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I37a3a316027197ab336f05a0ee674310fc3df57d
Gerrit-Change-Number: 735
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/735?usp=email )

Change subject: crypto_openssl: Suppress deprecation warnings with OpenSSL 3 for GCC as well
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:
I am not sure about this one. I would rather keep it deprecated and not easy to remove. I think we should also remove engine support when we also remove OpenSSL 1.x support. So I don't think there a good reason to pretend that this is not a deprecated feature.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/735?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I37a3a316027197ab336f05a0ee674310fc3df57d
Gerrit-Change-Number: 735
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 09 Sep 2024 11:55:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

#3 lore raw
In reply to a message not in the archive

flichtenheld has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/735?usp=email )

Change subject: crypto_openssl: Suppress deprecation warnings with OpenSSL 3 for GCC as well
......................................................................

Abandoned

Don't think this will go in if Arne doesn't like it
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/735?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I37a3a316027197ab336f05a0ee674310fc3df57d
Gerrit-Change-Number: 735
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: abandon