[Openvpn-devel,v1] Match ifdef for get_sigtype function with if ifdef of caller

Message ID 20240402063646.25490-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,v1] Match ifdef for get_sigtype function with if ifdef of caller | expand

Commit Message

Gert Doering April 2, 2024, 6:36 a.m. UTC
From: Arne Schwabe <arne@rfc2549.org>

These two ifdef needs to be the same otherwise the compiler will
break with a undefined function.

Change-Id: I5b14bf90bb07935f0bb84373ec4e62352752c03f
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/551
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering April 2, 2024, 9:55 a.m. UTC | #1
ACK, verified that it fixes the GHA build fails we've seen since the
recent LibreSSL upgrade on the MacOS builders.

Your patch has been applied to the master branch.

Not applicable to release/2.6 as the offending code is not in there.

commit ff402c7c2fbc49ff6d352ebdc3cdc4c27c2bbcbb (master)
Author: Arne Schwabe
Date:   Tue Apr 2 08:36:46 2024 +0200

     Match ifdef for get_sigtype function with if ifdef of caller

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20240402063646.25490-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28512.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index 6f29c3d..a158617 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -2166,7 +2166,8 @@ 
     EVP_PKEY_free(pkey);
 }
 
-#if !defined(LIBRESSL_VERSION_NUMBER)  && OPENSSL_VERSION_NUMBER >= 0x1010000fL
+#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1010000fL) \
+    || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x3090000fL)
 /**
  * Translate an OpenSSL NID into a more human readable name
  * @param nid