From: "cron2 (Code Review)" Date: Thu, 15 Jan 2026 09:39:02 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <204e2256f90731a5c5968cdc9cf8946d2f51f51d-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="BDa9Mfwq9ak="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: ssl_verify: Fix parsing of timeout from auth pending file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --BDa9Mfwq9ak= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1451?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: ssl_verify: Fix parsing of timeout from auth pending file ...................................................................... ssl_verify: Fix parsing of timeout from auth pending file Make sure the value is not negative before casting it to unsigned. Change-Id: I8a5efb2ed009a702f10dc8f40c677f014547b4c8 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1451 Message-Id: <20260115093235.25635-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 275.html Signed-off-by: Gert Doering --- M src/openvpn/ssl_verify.c 1 file changed, 6 insertions(+), 14 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/51/1451/2 diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index a3ba66e..0b02a2f 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -874,11 +874,6 @@ return supported; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - /** * Checks if the deferred state should also send auth pending * request to the client. Also removes the auth_pending control file @@ -888,7 +883,8 @@ * @returns false The file had an invlaid format or another error occured */ static bool -key_state_check_auth_pending_file(struct auth_deferred_status *ads, struct= tls_multi *multi, +key_state_check_auth_pending_file(struct auth_deferred_status *ads, + struct tls_multi *multi, struct tls_session *session) { bool ret =3D true; @@ -916,7 +912,7 @@ buf_chomp(extra_buf); long timeout =3D strtol(BSTR(timeout_buf), NULL, 10); - if (timeout =3D=3D 0) + if (timeout <=3D 0) { msg(M_WARN, "could not parse auth pending file timeout"); buffer_list_free(lines); @@ -933,14 +929,14 @@ pending_method); auth_set_client_reason(multi, buf); msg(M_INFO, - "Client does not supported auth pending method " - "'%s'", + "Client does not supported auth pending method '%s'", pending_method); ret =3D false; } else { - send_auth_pending_messages(multi, session, BSTR(extra_buf)= , timeout); + send_auth_pending_messages(multi, session, BSTR(extra_buf), + (unsigned int)timeout); } } @@ -950,10 +946,6 @@ return ret; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - /** * Removes auth_pending and auth_control files from file system * and key_state structure -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1451?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: I8a5efb2ed009a702f10dc8f40c677f014547b4c8 Gerrit-Change-Number: 1451 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --BDa9Mfwq9ak= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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

View Change

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

ssl_verify: Fix parsing of timeout =
from auth pending file

Make sure the value is not negative before ca= sting
it to unsigned.

Change-Id: I8a5efb2ed009a702f10dc8f40c677f0= 14547b4c8
Signed-off-by: Frank Lichtenheld <frank@...2641...>
A= cked-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit= .openvpn.net/c/openvpn/+/1451
Message-Id: <20260115093235.25635-1-ger= t@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1096...= ourceforge.net/msg35275.html
Signed-off-by: Gert Doering <gert@...1826...= 6...>
---
M src/openvpn/ssl_verify.c
1 file changed, 6 insertio= ns(+), 14 deletions(-)

git pull ssh://gerrit.ope=
nvpn.net:29418/openvpn refs/changes/51/1451/2
diff --git a/src/open=
vpn/ssl_verify.c b/src/openvpn/ssl_verify.c
index a3ba66e..= 0b02a2f 100644
--- a/src/openvpn/ssl_verify.c
+++ b/src/openvpn/ssl_verify.c
@@ -874,11 +874,6 @@
return supported;
}

-#if defined(__GNUC__) || = defined(__clang__)
-#pr= agma GCC diagnostic push
-#endif
-
/**
* Checks if = the deferred state should also send auth pending
* reque= st to the client. Also removes the auth_pending control file
@@ -888,7 +883,8 @@
* @returns false The file had an = invlaid format or another error occured
*/
static bool
-key_sta= te_check_auth_pending_file(struct auth_deferred_status *ads, struct tls_mul= ti *multi,
+key_state= _check_auth_pending_file(struct auth_deferred_status *ads,
+ st= ruct tls_multi *multi,
s= truct tls_session *session)
{
bool re= t =3D true;
@@ -916,7 +912,7 @@
= buf_chomp(extra_buf);

long= timeout =3D strtol(BSTR(timeout_buf), NULL, 10);
- if (timeout =3D=3D 0)
+ if (timeout <=3D 0= )
{
msg(M_WAR= N, "could not parse auth pending file timeout");
= buffer_list_free(lines);
@@ -933,14 +929,1= 4 @@
pending_method);
<= span> auth_set_client_reason(multi, buf);
= msg(M_INFO,
- "Client does not supported auth pending meth= od "
- = "'%s'",
+ "Client does not supported auth pend= ing method '%s'",
pending= _method);
ret =3D false;
= }
else
= {
- se= nd_auth_pending_messages(multi, session, BSTR(extra_buf), timeout);<= br>+ send_auth_p= ending_messages(multi, session, BSTR(extra_buf),
+ (un= signed int)timeout);
}
= }

@@ -950,10 +946,6 @@
= return ret;
}

-#if defined(__GNUC__) || defined(__clang__)=
-#pragma GCC diagnosti= c pop
-#endif-
/** * Removes auth_pending and auth_control files from file system
* and key_state structure

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

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8a5efb2ed009a702f10dc8f40c6= 77f014547b4c8
Gerrit-Change-Number: 1451
Gerrit-PatchSet: 2
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>
= --BDa9Mfwq9ak=--