From: "cron2 (Code Review)"
Date: Wed, 12 Nov 2025 13:58:57 +0000
In-Reply-To:
References:
Reply-To: gert@...1296..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID: <46f001df2054564efee5ff94cb7c34f2a5de0ab1-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="+cnJrfUKags="; charset=UTF-8
Subject: [Openvpn-devel] [S] Change in openvpn[master]: openssl_compat:
Avoid conversion warning for SSL_get_negotiated_group
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: flichtenheld , plaisthos
Cc: openvpn-devel
--+cnJrfUKags=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 has uploaded a new patch set (#3) to the change originally created by=
flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1359?usp=3Demail )
The following approvals got outdated and were removed:
Code-Review+2 by plaisthos
Change subject: openssl_compat: Avoid conversion warning for SSL_get_negoti=
ated_group
......................................................................
openssl_compat: Avoid conversion warning for SSL_get_negotiated_group
SSL_get_negotiated_group is documented to return
int and SSL_group_to_name definitely expects an int.
But SSL_get_negotiated_group is actually a macro
implemented by SSL_ctrl, which does return a long.
So to avoid the conversion warning we need the cast.
Change-Id: I31024f93d9d9d0f678fb39d4758a7e870bf00873
Signed-off-by: Frank Lichtenheld
Acked-by: Arne Schwabe
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1359
Message-Id: <20251111153230.29865-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34=
316.html
Signed-off-by: Gert Doering
---
M src/openvpn/openssl_compat.h
1 file changed, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/59/1359/3
diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
index fb3c9b1..b9af132 100644
--- a/src/openvpn/openssl_compat.h
+++ b/src/openvpn/openssl_compat.h
@@ -194,21 +194,12 @@
LIBRESSL_VERSION_NUMBER > 0x3050400fL) */
#if OPENSSL_VERSION_NUMBER < 0x30200000L && OPENSSL_VERSION_NUMBER >=3D 0x=
30000000L
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
static inline const char *
SSL_get0_group_name(SSL *s)
{
- int nid =3D SSL_get_negotiated_group(s);
+ int nid =3D (int)SSL_get_negotiated_group(s);
return SSL_group_to_name(s, nid);
}
-
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
#endif
/* Introduced in OpenSSL 3.6.0 */
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1359?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: I31024f93d9d9d0f678fb39d4758a7e870bf00873
Gerrit-Change-Number: 1359
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
--+cnJrfUKags=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 upl=
oaded patch set #3 to the change originally created by flichtenhel=
d.
View Change
The following approvals got outdated and were remove=
d:
Code-Review+2 by plaisthos
openssl_compat: Avoid conversio=
n warning for SSL_get_negotiated_group
SSL_get_negotiated_group is d=
ocumented to return
int and SSL_group_to_name definitely expects an int.=
But SSL_get_negotiated_group is actually a macro
implemented by =
SSL_ctrl, which does return a long.
So to avoid the conversion warning w=
e need the cast.
Change-Id: I31024f93d9d9d0f678fb39d4758a7e870bf0087=
3
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by:=
Arne Schwabe <arne-openvpn@...1227...>
Gerrit URL: https://gerrit=
.openvpn.net/c/openvpn/+/1359
Message-Id: <20251111153230.29865-1-ger=
t@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1096...=
ourceforge.net/msg34316.html
Signed-off-by: Gert Doering <gert@...1826...=
6...>
---
M src/openvpn/openssl_compat.h
1 file changed, 1 inse=
rtion(+), 10 deletions(-)
git pull ssh://gerrit.=
openvpn.net:29418/openvpn refs/changes/59/1359/3
diff --git a/src/o=
penvpn/openssl_compat.h b/src/openvpn/openssl_compat.h
inde=
x fb3c9b1..b9af132 100644
--- a/src/openvpn/openssl_compat.=
h
+++ b/src/openvpn/openssl_compat.h
@@ -19=
4,21 +194,12 @@
LIBRESSL_VERSION_NUMBER > 0x3=
050400fL) */
#if OPENSSL_VERSION_NUMBER =
< 0x30200000L && OPENSSL_VERSION_NUMBER >=3D 0x30000000L
-#if defined(__GNUC__) || d=
efined(__clang__)
-#pra=
gma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
static inline const char *
SSL_get0_group_name(SSL *s)
{
- int nid =3D SSL_get_negotiated_group(s=
);
+ int nid =3D (=
int)SSL_get_negotiated_group(s);
return SSL_group_to_n=
ame(s, nid);
}
-
-#if defined=
(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
#endif
=
/* Introduced in OpenSSL 3.6.0 */
<=
p>To view, visit change 1359. To unsubscribe, or for help writing mail filters=
, visit settings=
.
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I31024f93d9d9d0f678fb39d4758=
a7e870bf00873
Gerrit-Change-Number: 1359
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
=
--+cnJrfUKags=--