Change in openvpn[master]: ssl_verify: Fix parsing of timeout from auth pending file
A message that is not in the archive (sent off-list or not yet received): gerrit.1766154207000.I8a5efb2ed009a702f10dc8f40c677f014547b4c8@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1451?usp=email
to review the following change.
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.
---
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/1
src/openvpn/ssl_verify.c +6 -14
@@ -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 = true;
@@ -916,7 +912,7 @@buf_chomp (extra_buf);long timeout =strtol (BSTR (timeout_buf),NULL ,10 ); -if (timeout ==0 ) +if (timeout <=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 = 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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8a5efb2ed009a702f10dc8f40c677f014547b4c8
Gerrit-Change-Number: 1451
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1451?usp=email )
Change subject: ssl_verify: Fix parsing of timeout from auth pending file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1451?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8a5efb2ed009a702f10dc8f40c677f014547b4c8
Gerrit-Change-Number: 1451
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 15 Jan 2026 09:32:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH 1/1 ssl_verify: Fix parsing of timeout from auth pending file
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
Make sure the value is not negative before casting it to unsigned.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1451
---
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/+/1451
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/ssl_verify.c +6 -14
@@ -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 = true;
@@ -916,7 +912,7 @@buf_chomp (extra_buf);long timeout =strtol (BSTR (timeout_buf),NULL ,10 ); -if (timeout ==0 ) +if (timeout <=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 = 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
[Openvpn-devel] [PATCH applied] Re: ssl_verify: Fix parsing of timeout from auth pending file
"makes sense", also the text wrapping close by really needed fixing.
Not tested beyond BB compile.
Your patch has been applied to the master branch.
commit b34dc9279d774756a2451ff783d0f71a21d3f42c
Author: Frank Lichtenheld Date: Thu Jan 15 10:32:29 2026 +0100
ssl_verify: Fix parsing of timeout from auth pending file
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1451
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35275.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1451?usp=email )
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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1451
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35275.html
---
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
src/openvpn/ssl_verify.c +6 -14
@@ -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 = true;
@@ -916,7 +912,7 @@buf_chomp (extra_buf);long timeout =strtol (BSTR (timeout_buf),NULL ,10 ); -if (timeout ==0 ) +if (timeout <=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 = 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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8a5efb2ed009a702f10dc8f40c677f014547b4c8
Gerrit-Change-Number: 1451
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1451?usp=email )
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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1451
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35275.html
---
M src/openvpn/ssl_verify.c
1 file changed, 6 insertions(+), 14 deletions(-)
src/openvpn/ssl_verify.c +6 -14
@@ -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 = true;
@@ -916,7 +912,7 @@buf_chomp (extra_buf);long timeout =strtol (BSTR (timeout_buf),NULL ,10 ); -if (timeout ==0 ) +if (timeout <=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 = 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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8a5efb2ed009a702f10dc8f40c677f014547b4c8
Gerrit-Change-Number: 1451
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>