]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix renewal spelling and actually allow external-auth with renewal time
authorArne Schwabe <arne@rfc2549.org>
Tue, 18 Oct 2022 14:37:04 +0000 (16:37 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 18 Oct 2022 15:24:56 +0000 (17:24 +0200)
The previous commit 9a516170 forgot to change to allow more than 2
parameters to auth-gen-token, so you could either have renewal time
or external-auth but not both. Also fix two instances of misspelled
"renewal".

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221018143704.2759522-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25418.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c

index 60fec147ff80fb53e06aae286acccd2d7783e46e..9f5e4b35d0db65fd945e930130c5ac444e93dd48 100644 (file)
@@ -2635,7 +2635,7 @@ options_postprocess_verify_ce(const struct options *options,
         if (options->auth_token_generate && options->auth_token_renewal
             && options->auth_token_renewal < 2 * options->handshake_window)
         {
-            msg(M_USAGE, "--auth-gen-token reneweal time needs to be at least "
+            msg(M_USAGE, "--auth-gen-token renewal time needs to be at least "
                 " two times --hand-window (%d).",
                 options->handshake_window);
 
@@ -7476,7 +7476,7 @@ add_option(struct options *options,
                         &options->auth_user_pass_verify_script,
                         p[1], "auth-user-pass-verify", true);
     }
-    else if (streq(p[0], "auth-gen-token") && !p[3])
+    else if (streq(p[0], "auth-gen-token"))
     {
         VERIFY_PERMISSION(OPT_P_GENERAL);
         options->auth_token_generate = true;
@@ -7484,7 +7484,7 @@ add_option(struct options *options,
 
         for (int i = 2; i < MAX_PARMS && p[i] != NULL; i++)
         {
-            /* the second parameter can be the reneweal time */
+            /* the second parameter can be the renewal time */
             if (i == 2 && positive_atoi(p[i]))
             {
                 options->auth_token_renewal = positive_atoi(p[i]);