]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Log when writing username/password to TLS buffer fails
authorSelva Nair <selva.nair@gmail.com>
Tue, 14 Apr 2026 05:57:14 +0000 (07:57 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 14 Apr 2026 16:25:20 +0000 (18:25 +0200)
Currently we get an unhelpful "Key Method #2 failed" error.
Add a more specific warning message.

Change-Id: I9468811fd434e17645957fc12770aa2b9ed98fb8
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1600
Message-Id: <20260414055721.16857-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36604.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit fd1fd077ea7781be8be6e05f2a2b657619c7e437)

src/openvpn/ssl.c

index 962f5df4aabe2a55b6b23ae12e4ad0741bb85e00..b188b4e9b32791c48024e1eda470698dda7c40ca 100644 (file)
@@ -2125,10 +2125,12 @@ key_method_2_write(struct buffer *buf, struct tls_multi *multi, struct tls_sessi
 
         if (!write_string(buf, up->username, -1))
         {
+            msg(M_WARN, "WARNING: Failed to write auth username to TLS buffer");
             goto error;
         }
         else if (!write_string(buf, up->password, -1))
         {
+            msg(M_WARN, "WARNING: Failed to write auth password to TLS buffer");
             goto error;
         }
         /* save username for auth-token which may get pushed later */