From: "cron2 (Code Review)" Date: Wed, 4 Mar 2026 16:44:06 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <3fa45cad9b25bdf424d70f6c5f9e14461dd132aa-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="YlGTYY5qD00="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: ssl_openssl: Use correct return type for RSA_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --YlGTYY5qD00= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#6) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1493?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2, Code-Review+2 by plaisthos Change subject: ssl_openssl: Use correct return type for RSA_size ...................................................................... ssl_openssl: Use correct return type for RSA_size It returns int, so use that. Avoids a sign-compare warning. Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493 Message-Id: <20260304144028.2459-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 890.html Signed-off-by: Gert Doering --- M src/openvpn/ssl_openssl.c 1 file changed, 2 insertions(+), 12 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/93/1493/6 diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 095f893..840d9a0 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -1491,17 +1491,11 @@ return len; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - /* sign arbitrary data */ static int rsa_priv_enc(int flen, const unsigned char *from, unsigned char *to, RSA *= rsa, int padding) { - unsigned int len =3D RSA_size(rsa); - int ret =3D -1; + int len =3D RSA_size(rsa); if (padding !=3D RSA_PKCS1_PADDING && padding !=3D RSA_NO_PADDING) { @@ -1509,15 +1503,11 @@ return -1; } - ret =3D get_sig_from_man(from, flen, to, len, get_rsa_padding_name(pad= ding)); + int ret =3D get_sig_from_man(from, flen, to, len, get_rsa_padding_name= (padding)); return (ret =3D=3D len) ? ret : -1; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - static int tls_ctx_use_external_rsa_key(struct tls_root_ctx *ctx, EVP_PKEY *pkey) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1493?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: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f Gerrit-Change-Number: 1493 Gerrit-PatchSet: 6 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --YlGTYY5qD00= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #6 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2, Code-Review+2 by plaisthos

ssl_ope=
nssl: Use correct return type for RSA_size

It returns int, so use th= at. Avoids a sign-compare
warning.

Change-Id: Ie8135a31b1f8f70ce0= ddf63d7653f3d84a9e983f
Signed-off-by: Frank Lichtenheld <frank@...2716...= 1...>
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Acked= -by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.ope= nvpn.net/c/openvpn/+/1493
Message-Id: <20260304144028.2459-1-gert@...493...= 1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1659...= forge.net/msg35890.html
Signed-off-by: Gert Doering <gert@...1296...&= gt;
---
M src/openvpn/ssl_openssl.c
1 file changed, 2 insertions(+= ), 12 deletions(-)

git pull ssh://gerrit.openvpn=
.net:29418/openvpn refs/changes/93/1493/6
diff --git a/src/openvpn/=
ssl_openssl.c b/src/openvpn/ssl_openssl.c
index 095f893..84= 0d9a0 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -1491,17 +1491,11 @@
return len;
}
=
-#if defined(__GNUC__) || def= ined(__clang__)
-#pragm= a GCC diagnostic push
-= #pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
/* sign arbitrary data */
= static int
rsa_priv_enc(int flen, const unsigned ch= ar *from, unsigned char *to, RSA *rsa, int padding)
{

- unsigned int len =3D R= SA_size(rsa);
- int = ret =3D -1;
+ int = len =3D RSA_size(rsa);

if (padding != =3D RSA_PKCS1_PADDING && padding !=3D RSA_NO_PADDING)
{
@@ -1509,15 +1503,11 @@
= return -1;
}

- ret =3D get_sig_from_man(from, flen, to= , len, get_rsa_padding_name(padding));
+ int ret =3D get_sig_from_man(from, flen, to, len, ge= t_rsa_padding_name(padding));

return= (ret =3D=3D len) ? ret : -1;
}
-#if defined(__GNUC__) || defin= ed(__clang__)
-#pragma = GCC diagnostic pop
-#en= dif
-
= static int
tls_ctx_use_external_rsa_key(struct tls_root_ct= x *ctx, EVP_PKEY *pkey)
{

To view, visit change 1493. To unsubscribe, or for help writing mail filter= s, visit setting= s.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d765= 3f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --YlGTYY5qD00=--