]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix charset handling for --key-password on command line
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 25 May 2017 20:15:27 +0000 (21:15 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 25 May 2017 20:15:27 +0000 (21:15 +0100)
It was always converting to UTF-8 for input from the terminal; there
was a plausible reason for using the legacy charset as-is but it's
better to be consistent.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
main.c

diff --git a/main.c b/main.c
index 7869f721767f358efa981372621cbcd300f2b980..c127b62c7a97ecbca17576a1156861f4dd700fba 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1307,7 +1307,7 @@ int main(int argc, char **argv)
                        }
                        break;
                case 'p':
-                       vpninfo->cert_password = strdup(config_arg);
+                       vpninfo->cert_password = dup_config_arg();
                        break;
                case 'P':
                        proxy = keep_config_arg();