]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
options.c: update usage description of --cipher
authorFrank Lichtenheld <frank@lichtenheld.com>
Wed, 28 Dec 2022 17:13:14 +0000 (18:13 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 28 Dec 2022 21:46:24 +0000 (22:46 +0100)
GCC with -O3 complains:
warning: ā€˜%s’ directive argument is null [-Wformat-overflow=]

And indeed:
--cipher alg    : Encrypt packets with cipher algorithm alg
                  (default=(null)).

Since there is no real default anymore, remove it.
While here also indicate the somewhat-deprecated status
of the option.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221228171314.133115-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25851.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 4410daac5af8be778cb2dd2d45a44b5e67938496)

src/openvpn/options.c

index 7395019e31657f9f29f99d09298d0f550af6f232..ee3783046e214c8d4a09cdf647424ebfef65d0b6 100644 (file)
@@ -543,8 +543,8 @@ static const char usage_message[] =
     "                  digest algorithm alg (default=%s).\n"
     "                  (usually adds 16 or 20 bytes per packet)\n"
     "                  Set alg=none to disable authentication.\n"
-    "--cipher alg    : Encrypt packets with cipher algorithm alg\n"
-    "                  (default=%s).\n"
+    "--cipher alg    : Encrypt packets with cipher algorithm alg.\n"
+    "                  You should usually use --data-ciphers instead.\n"
     "                  Set alg=none to disable encryption.\n"
     "--data-ciphers list : List of ciphers that are allowed to be negotiated.\n"
 #ifndef ENABLE_CRYPTO_MBEDTLS
@@ -4779,7 +4779,7 @@ usage(void)
             o.ce.local_port, o.ce.remote_port,
             TUN_MTU_DEFAULT, TAP_MTU_EXTRA_DEFAULT,
             o.verbosity,
-            o.authname, o.ciphername,
+            o.authname,
             o.replay_window, o.replay_time,
             o.tls_timeout, o.renegotiate_seconds,
             o.handshake_window, o.transition_window);