From: "flichtenheld (Code Review)"
Date: Tue, 11 Nov 2025 14:26:54 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net
Message-ID:
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="o2W7ULbIshE="; 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: plaisthos
Cc: openvpn-devel
--o2W7ULbIshE=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1359?usp=3Demail
to look at the new patch set (#2).
The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied=
now.
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
---
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/2
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: 2
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: flichtenheld
--o2W7ULbIshE=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is cur=
rently required from: flichtenheld.
flichtenheld uploaded patch set #2 to this change.
<=
p>View C=
hange
The change is no longer submittable: checks~ChecksSubmitRul=
e is unsatisfied now.
openssl_compat: Avoid conversion war=
ning for SSL_get_negotiated_group
SSL_get_negotiated_group is docume=
nted to return
int and SSL_group_to_name definitely expects an int.
<=
br>But SSL_get_negotiated_group is actually a macro
implemented by SSL_c=
trl, which does return a long.
So to avoid the conversion warning we nee=
d the cast.
Change-Id: I31024f93d9d9d0f678fb39d4758a7e870bf00873
=
Signed-off-by: Frank Lichtenheld <frank@...2641...>
---
M src/o=
penvpn/openssl_compat.h
1 file changed, 1 insertion(+), 10 deletions(-)<=
br>
git pull ssh://gerrit.openvpn.net:29418/openvpn =
refs/changes/59/1359/2
diff --git a/src/openvpn/openssl_compat.h b/=
src/openvpn/openssl_compat.h
index fb3c9b1..b9af132 100644<=
/span>
--- a/src/openvpn/openssl_compat.h
+++ b/sr=
c/openvpn/openssl_compat.h
@@ -194,21 +194,12 @@
=
LIBRESSL_VERSION_NUMBER > 0x3050400fL) */
#if OPENSSL_VERSION_NUMBER < 0x30200000L &&=
; OPENSSL_VERSION_NUMBER >=3D 0x30000000L
-#if defined(__GNUC__) || defined(__clang__)-#pragma GCC diagnostic push
-#pragma GCC diagnostic i=
gnored "-Wconversion"
-#endif
-
static inline const char *
SSL_get0_group_nam=
e(SSL *s)
{
- int nid =3D SSL_get_negotiated_group(s);
+ int nid =3D (int)SSL_get_negotiated_g=
roup(s);
return SSL_group_to_name(s, nid);
<=
span> }
-
-#if defined(__GNUC__) || defined(__=
clang__)
-#pragma GCC d=
iagnostic pop
-#endif=
span>
#endif
/* Introduced in =
OpenSSL 3.6.0 */
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: 2
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...=
41...>
=
--o2W7ULbIshE=--