Browse code

Deprecate --keysize

The --keysize option can only be used with already deprecated ciphers,
such as CAST5, RC2 or BF. Deviating from the default keysize is
generally not a good idea (see man page text), and otherwise only
complicates our code.

Since we will also remove the support for weak ciphers (ciphers with
cipher block length less than 128 bits) in OpenVPN 2.6 as well, we
start the deprecation of this option instantly.

[DS: Slightly amended the patch, referencing OpenVPN 2.6 and added
a few more details to Changes.rst and the commit message]

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20170701112951.19119-1-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15004.html
Signed-off-by: David Sommerseth <davids@openvpn.net>

Steffan Karger authored on 2017/07/01 20:29:51
Showing 3 changed files
... ...
@@ -178,6 +178,9 @@ Deprecated features
178 178
 
179 179
 - ``--no-iv`` is deprecated in 2.4 and will be removed in 2.5.
180 180
 
181
+- ``--keysize`` is deprecated and will be removed in v2.6 together
182
+  with the support of ciphers with cipher block size less than 128 bits.
183
+
181 184
 
182 185
 User-visible Changes
183 186
 --------------------
... ...
@@ -4217,6 +4217,9 @@ negotiation.
4217 4217
 .\"*********************************************************
4218 4218
 .TP
4219 4219
 .B \-\-keysize n
4220
+.B DEPRECATED
4221
+This option will be removed in OpenVPN 2.6.
4222
+
4220 4223
 Size of cipher key in bits (optional).
4221 4224
 If unspecified, defaults to cipher-specific default.  The
4222 4225
 .B \-\-show\-ciphers
... ...
@@ -2484,6 +2484,11 @@ options_postprocess_verify_ce(const struct options *options, const struct connec
2484 2484
         msg(M_USAGE, "NCP cipher list contains unsupported ciphers.");
2485 2485
     }
2486 2486
 
2487
+    if (options->keysize)
2488
+    {
2489
+        msg(M_WARN, "WARNING: --keysize is DEPRECATED and will be removed in OpenVPN 2.6");
2490
+    }
2491
+
2487 2492
     /*
2488 2493
      * Check consistency of replay options
2489 2494
      */