From: Steffan Karger Date: Sat, 1 Jul 2017 11:29:51 +0000 (+0200) Subject: Deprecate --keysize X-Git-Tag: v2.4.4~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2ab4958528a352c3ddad02446c10814afe68f6b;p=thirdparty%2Fopenvpn.git 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 Acked-by: David Sommerseth 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 (cherry picked from commit ad178f01444d61e48fca83c4f0bc5d82270cee87) --- diff --git a/Changes.rst b/Changes.rst index d94b3fbff..3d758f2ea 100644 --- a/Changes.rst +++ b/Changes.rst @@ -178,6 +178,9 @@ Deprecated features - ``--no-iv`` is deprecated in 2.4 and will be removed in 2.5. +- ``--keysize`` is deprecated and will be removed in v2.6 together + with the support of ciphers with cipher block size less than 128 bits. + User-visible Changes -------------------- diff --git a/doc/openvpn.8 b/doc/openvpn.8 index 56c0f7a69..8170164b0 100644 --- a/doc/openvpn.8 +++ b/doc/openvpn.8 @@ -4218,6 +4218,9 @@ negotiation. .\"********************************************************* .TP .B \-\-keysize n +.B DEPRECATED +This option will be removed in OpenVPN 2.6. + Size of cipher key in bits (optional). If unspecified, defaults to cipher-specific default. The .B \-\-show\-ciphers diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 6191e4888..2b096eb03 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2495,6 +2495,11 @@ options_postprocess_verify_ce(const struct options *options, const struct connec msg(M_WARN, "WARNING: --no-iv is deprecated and will be removed in 2.5"); } + if (options->keysize) + { + msg(M_WARN, "WARNING: --keysize is DEPRECATED and will be removed in OpenVPN 2.6"); + } + /* * Check consistency of replay options */