* [Openvpn-devel] Remove support for key-method 1 from master/2.4
@ 2015-03-08 10:38 Steffan Karger
2016-11-14 19:58 ` [Openvpn-devel] [PATCH] Deprecate key-method 1 Steffan Karger
0 siblings, 1 reply; 7+ messages in thread
From: Steffan Karger @ 2015-03-08 10:38 UTC (permalink / raw)
To: openvpn-users, openvpn-devel
Hi,
To create keys for the data channel, OpenVPN currently supports two
mechanisms, 'Key method 1' and the newer 'Key method 2'. Key method 2
is supported since OpenVPN 1.5, and has been the default from OpenVPN
2.0. See the manpage and/or
http://openvpn.net/index.php/open-source/documentation/security-overview.html
for a short recap of both methods.
I think the time has come to remove support for key method 1 from
OpenVPN. This will allow us to remove quite some legacy code, and will
probably allow us to simplify some of the surrounding code.
However, before investing time in preparing a patch for this, I would
like to hear if there are objections to this proposal. So, if you have
a setup that uses key method 1, and you want to use that setup with
OpenVPN 2.4, or have other reasons to believe we should keep supporting
key method 1 in OpenVPN 2.4, please speak up.
-Steffan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Openvpn-devel] [PATCH] Deprecate key-method 1
2015-03-08 10:38 [Openvpn-devel] Remove support for key-method 1 from master/2.4 Steffan Karger
@ 2016-11-14 19:58 ` Steffan Karger
2016-11-14 20:06 ` [Openvpn-devel] [PATCH v2] " Steffan Karger
0 siblings, 1 reply; 7+ messages in thread
From: Steffan Karger @ 2016-11-14 19:58 UTC (permalink / raw)
To: openvpn-devel
Key method 2 has been the default since OpenVPN 2.0, and is both more
functional and secure. Also, key method 1 was only ever supported for
peer-to-peer connections (i.e. not for client-server).
Let's get rid of some legacy and phase out key method 1.
Signed-off-by: Steffan Karger <steffan@...1856...>
---
src/openvpn/options.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 1eb3a41..f39c4fa 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -2245,6 +2245,12 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
"may accept clients which do not present a certificate");
}
+ if (options->key_method == 1)
+ {
+ msg (M_WARN, "WARNING: --key-method 1 is deprecated and will be removed"
+ "in OpenVPN 2.5. Migrate to --key-method 2 as soon as possible.");
+ }
+
if (options->tls_server || options->tls_client)
{
#ifdef ENABLE_PKCS11
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Openvpn-devel] [PATCH v2] Deprecate key-method 1
2016-11-14 19:58 ` [Openvpn-devel] [PATCH] Deprecate key-method 1 Steffan Karger
@ 2016-11-14 20:06 ` Steffan Karger
2016-11-14 21:35 ` David Sommerseth
2016-11-14 22:10 ` [Openvpn-devel] [PATCH applied] " David Sommerseth
0 siblings, 2 replies; 7+ messages in thread
From: Steffan Karger @ 2016-11-14 20:06 UTC (permalink / raw)
To: openvpn-devel
Key method 2 has been the default since OpenVPN 2.0, and is both more
functional and secure. Also, key method 1 was only ever supported for
peer-to-peer connections (i.e. not for client-server).
Let's get rid of some legacy and phase out key method 1.
v2: add Changes.rst entry, and update man page
Signed-off-by: Steffan Karger <steffan@...1856...>
---
Changes.rst | 7 +++++++
doc/openvpn.8 | 5 ++++-
src/openvpn/options.c | 6 ++++++
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/Changes.rst b/Changes.rst
index c1b49c7..17d8edb 100644
--- a/Changes.rst
+++ b/Changes.rst
@@ -112,6 +112,13 @@ AIX platform support
devices since AIX does not provide tun interface.
+Deprecated features
+-------------------
+- ``--key-method 1`` is deprecated in 2.4 and will be removed in 2.5. Migrate
+ to ``--key-method 2`` as soon as possible. Note that this requires changing
+ the option in both the client and server side configs.
+
+
User-visible Changes
--------------------
- For certificate DNs with duplicate fields, e.g. "OU=one,OU=two", both fields
diff --git a/doc/openvpn.8 b/doc/openvpn.8
index 863dcf9..7227d22 100644
--- a/doc/openvpn.8
+++ b/doc/openvpn.8
@@ -4782,7 +4782,10 @@ exchanged over the TLS session.
In method 1 (the default for OpenVPN 1.x), both sides generate
random encrypt and HMAC-send keys which are forwarded to
-the other host over the TLS channel.
+the other host over the TLS channel. Method 1 is
+.B deprecated in OpenVPN 2.4
+, and
+.B will be removed in OpenVPN 2.5\fR.
In method 2, (the default for OpenVPN 2.0)
the client generates a random key. Both client
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 1eb3a41..f39c4fa 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -2245,6 +2245,12 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
"may accept clients which do not present a certificate");
}
+ if (options->key_method == 1)
+ {
+ msg (M_WARN, "WARNING: --key-method 1 is deprecated and will be removed"
+ "in OpenVPN 2.5. Migrate to --key-method 2 as soon as possible.");
+ }
+
if (options->tls_server || options->tls_client)
{
#ifdef ENABLE_PKCS11
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Openvpn-devel] [PATCH v2] Deprecate key-method 1
2016-11-14 20:06 ` [Openvpn-devel] [PATCH v2] " Steffan Karger
@ 2016-11-14 21:35 ` David Sommerseth
2016-11-14 21:42 ` Steffan Karger
2016-11-14 22:04 ` David Sommerseth
2016-11-14 22:10 ` [Openvpn-devel] [PATCH applied] " David Sommerseth
1 sibling, 2 replies; 7+ messages in thread
From: David Sommerseth @ 2016-11-14 21:35 UTC (permalink / raw)
To: Steffan Karger <steffan@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14/11/16 21:06, Steffan Karger wrote:
> Key method 2 has been the default since OpenVPN 2.0, and is both
> more functional and secure. Also, key method 1 was only ever
> supported for peer-to-peer connections (i.e. not for
> client-server).
>
> Let's get rid of some legacy and phase out key method 1.
>
> v2: add Changes.rst entry, and update man page
>
> Signed-off-by: Steffan Karger <steffan@...1856...> --- Changes.rst
> | 7 +++++++ doc/openvpn.8 | 5 ++++- src/openvpn/options.c |
> 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-)
I wanted to give this an ACK ... but I think we should just remove it
all together as we seem to be in a broken state already.
/usr/sbin/openvpn --dev tun --local 192.168.122.1 --lport 1194 \
--remote 192.168.122.100 --rport 194 \
--secret ../../sample/sample-keys/ta.key 0 \
--ifconfig 10.8.0.10 10.8.0.20 --verb 3 \
--key-method 1
Options error: Parameter key_method can only be specified in TLS-mode,
i.e. where --tls-server or --tls-client is also specified.
Use --help for more information.
That is with /usr/sbin/openvpn --version:
OpenVPN 2.3.11 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL]
[PKCS11] [MH] [IPv6] built on May 10 2016
So unless I messed up my simple and stupid static key p2p mode tunnel,
this doesn't work at all with v2.3. And git master haven't "fixed"
this issue.
If nobody noticed this by now, then nobody really uses --key-method.
- --
kind regards,
David Sommerseth
OpenVPN Technologies, Inc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJYKi41AAoJEIbPlEyWcf3yVasP/0vlhDldY6i+HkBGrlMg1OxK
TnuTlqdoz3pg3q3DJT20+7plpsXdahfymB3cETwI27A71gTLx3o894f0zZDAGNvU
b2svnA7VSGnQMc0E8Bg6puyZJi88MtIibNtVScuu47POumS8I/FcRYB6TVIyr815
MU9q7dsyVXeX9rHBKY7gXfgZGkvBnTEOS67HimIF/fxY+mHQffYJAyRwlZcFZ78V
HW3ymUa/FY28AKMMSaa0xemuaCM6bthIYd7H7o02kTLOVKHXoqgKOG0Axd7yL9i0
pLuzPSiPGrIojw8W1i/n2X50RMTfKhrevwpCD6GYu9LS013et7LLiLGlvEKFbgOJ
NjTd+A5yHjDx75YZ9LQr8I0Tb/Ix6Xm41NCdDQaykSDmztCpWm11tGZuOxEDVUeC
wuzHGfwox7lG2Q+M9rW3V/w077eVwxLg4gFuUD+w3S9qKwTuPw5PGH0R7zojL22T
tb626KAbOFQjk3NzDG97HCWC3BPB7LT5anPuLcxdsrL3Wf05DqarcBEJp3nQQgnm
r1jCg09awOAld4kcmyE57rPCc8/GahTHbDFTLu5s5XI7Auo6LCqHecuhJgslT3Qk
LGNP8PVb8LK80sfmvXInvNtxh3zdvRo+YD9tluXbPcs+ynbxD/8mBaib84aLhyw5
FGPPexuZhKkAINHyduu2
=NQRH
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Openvpn-devel] [PATCH v2] Deprecate key-method 1
2016-11-14 21:35 ` David Sommerseth
@ 2016-11-14 21:42 ` Steffan Karger
2016-11-14 22:04 ` David Sommerseth
1 sibling, 0 replies; 7+ messages in thread
From: Steffan Karger @ 2016-11-14 21:42 UTC (permalink / raw)
To: openvpn-devel
Hi,
On 14 November 2016 at 22:35, David Sommerseth
<openvpn@...2080...> wrote:
On 14/11/16 21:06, Steffan Karger wrote:
>> Key method 2 has been the default since OpenVPN 2.0, and is both
>> more functional and secure. Also, key method 1 was only ever
>> supported for peer-to-peer connections (i.e. not for
>> client-server).
>>
>> Let's get rid of some legacy and phase out key method 1.
>>
>> v2: add Changes.rst entry, and update man page
>>
>> Signed-off-by: Steffan Karger <steffan@...1856...> --- Changes.rst
>> | 7 +++++++ doc/openvpn.8 | 5 ++++- src/openvpn/options.c |
>> 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-)
>
> I wanted to give this an ACK ... but I think we should just remove it
> all together as we seem to be in a broken state already.
>
> /usr/sbin/openvpn --dev tun --local 192.168.122.1 --lport 1194 \
> --remote 192.168.122.100 --rport 194 \
> --secret ../../sample/sample-keys/ta.key 0 \
> --ifconfig 10.8.0.10 10.8.0.20 --verb 3 \
> --key-method 1
> Options error: Parameter key_method can only be specified in TLS-mode,
> i.e. where --tls-server or --tls-client is also specified.
> Use --help for more information.
>
> That is with /usr/sbin/openvpn --version:
> OpenVPN 2.3.11 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL]
> [PKCS11] [MH] [IPv6] built on May 10 2016
>
> So unless I messed up my simple and stupid static key p2p mode tunnel,
> this doesn't work at all with v2.3. And git master haven't "fixed"
> this issue.
>
> If nobody noticed this by now, then nobody really uses --key-method.
Well, the options parser is right: --key-method should be used
together with --tls-server and --tls-client. Use e.g. the
loopback-server and loopback-client configs from sample/sample-configs
to test this.
-Steffan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Openvpn-devel] [PATCH v2] Deprecate key-method 1
2016-11-14 21:35 ` David Sommerseth
2016-11-14 21:42 ` Steffan Karger
@ 2016-11-14 22:04 ` David Sommerseth
1 sibling, 0 replies; 7+ messages in thread
From: David Sommerseth @ 2016-11-14 22:04 UTC (permalink / raw)
To: Steffan Karger <steffan@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14/11/16 22:35, David Sommerseth wrote:
> On 14/11/16 21:06, Steffan Karger wrote:
>> Key method 2 has been the default since OpenVPN 2.0, and is both
>> more functional and secure. Also, key method 1 was only ever
>> supported for peer-to-peer connections (i.e. not for
>> client-server).
>
>> Let's get rid of some legacy and phase out key method 1.
>
>> v2: add Changes.rst entry, and update man page
>
>> Signed-off-by: Steffan Karger <steffan@...1856...> ---
>> Changes.rst | 7 +++++++ doc/openvpn.8 | 5 ++++-
>> src/openvpn/options.c | 6 ++++++ 3 files changed, 17
>> insertions(+), 1 deletion(-)
>
> I wanted to give this an ACK ... but I think we should just remove
> it all together as we seem to be in a broken state already.
>
> /usr/sbin/openvpn --dev tun --local 192.168.122.1 --lport 1194 \
> --remote 192.168.122.100 --rport 194 \ --secret
> ../../sample/sample-keys/ta.key 0 \ --ifconfig 10.8.0.10 10.8.0.20
> --verb 3 \ --key-method 1 Options error: Parameter key_method can
> only be specified in TLS-mode, i.e. where --tls-server or
> --tls-client is also specified. Use --help for more information.
>
> That is with /usr/sbin/openvpn --version: OpenVPN 2.3.11
> x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH]
> [IPv6] built on May 10 2016
>
> So unless I messed up my simple and stupid static key p2p mode
> tunnel, this doesn't work at all with v2.3. And git master haven't
> "fixed" this issue.
>
> If nobody noticed this by now, then nobody really uses
> --key-method.
Okay, so I was mistaken. It is possible to use p2p mode with
- --tls-server/--tls-client without setting --mode server. My prior
tests used --server and --client, which does not allow --key-method to
be set to anything but 2.
Running a test-case using the
sample/sample-config-files/loopback-{client,server} test configs
triggered the correct code path, and both --key-method 1 and 2 could
be tested properly.
So it's an ACK after all. But I will slightly modify the warning +
Changes.rst to recommend not setting --key-method, as that will
currently default to --key-method 2.
- --
kind regards,
David Sommerseth
OpenVPN Technologies, Inc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJYKjUBAAoJEIbPlEyWcf3yRxAP/0HZCEWTN5pdOCb/gPJ/C9CM
71Br6fzMZqF/cm/rd6EhZwFd8PB+YTq7ppiRbKBHxLZFNT2ZpE94FvkzNGtWePW5
xJB0vcLjejDUcXAY04iuf9Ye1HPMq7y+GN6cGwMD9pO6Y6iqPKCuBKstkypT0XU7
80QuNoXXCzP9+DWcGnLlKWLC+CLlE6LKVycGCCl/mMppLHZwlCFNw7JKfr7GKYCT
FgMcPlqh9EGAcZOnxQIGWhxOUatWHcZm2vEdLhziCWA4MDO2ubeoEh6ol0+p1XcN
BirZHgvNmw/wq31GG38KGOiE7qMGjUHf9UR6WMwS/g+BzJCV8/0LcNCjXaTWDMKI
qlzb9nXXJ7a2CiigW1a3DmCXICBjwKimrzoRWM2GZQfwmrQP1joDnDJvG12ieHab
3yXh406Ky33/wnx/DG+om6OiJsGNV2Ygh8EtqyrKKIgHh7NzHVbESsTRSVfNOApn
aM0jwotj2s4rWgJ9Uf4PLp1p+7ujNegJ/9ZcFZLqLH7eAD+VsBGA8qg+KLNk0ldu
lnbCdyMO2mxZV+oVLVWAHODbJI/8OIxihNuV8lqzDyY4dS6HeOFnfePGKJJK9JI3
g/KWbLhPmWG4oQ4ocG04I9mbiJYHgfa6B1Xda1JwCiOexreoWW3rbFX5EqzjYx9L
fKgS3he37m8WQCHqD4SB
=8vbI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Openvpn-devel] [PATCH applied] Deprecate key-method 1
2016-11-14 20:06 ` [Openvpn-devel] [PATCH v2] " Steffan Karger
2016-11-14 21:35 ` David Sommerseth
@ 2016-11-14 22:10 ` David Sommerseth
1 sibling, 0 replies; 7+ messages in thread
From: David Sommerseth @ 2016-11-14 22:10 UTC (permalink / raw)
To: steffan@; +Cc: openvpn-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
ACK, but with a minor adjustment to the warning + Changes.rst
file. The text now tries to encourage not setting --key-method
at all, as that will default to --key-method 2.
Your patch has been applied to the master branch
commit 1ce0638627eb35631af9bfaa569468573568ec65
Author: Steffan Karger
Date: Mon Nov 14 21:06:07 2016 +0100
Deprecate key-method 1
Signed-off-by: Steffan Karger <steffan@...1856...>
Acked-by: David Sommerseth <davids@...515...>
Message-Id: <1479153967-6788-1-git-send-email-steffan@...1856...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13054.html
Signed-off-by: David Sommerseth <davids@...515...>
- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJYKjYzAAoJEIbPlEyWcf3yiSMP/27hFtYCIUlLIaMyvaHWeLqu
Rfizl0PPpXX3Q3Nwi9SJBGwQdMEFf9UJJKMKpBdrVq4ftRHD/qef25pe+a3DxsCY
/l5skP3SXHGf+7EsRvRmvmqXoHArJlJuQy3LYJZF6M7SBw39tDiaEI/p2zFCwgTS
tVmQr0IMs/ZKYKmnDF6LHdUfzpEDkYfe1yhqsO0+nFUdbV6ePZ80xHyGy/BWbypK
QVS6o3uxiCl7CakyxA2Twg7DFg0/64g+lE+OGCEy3rS6IUGB6q/0njAKYqlPp8VP
81ULuFrHXydVHSgy3jb6peakHu1MP2zEKBiaBtPm2nuQ+IgkvoCQIwgmdc39FZDs
DPRheUQXvoUv2Dx2U2ns01SANzpXpQzVsFiyJZqzC59RLLigL9V5CRrPDiw9YozQ
KKQahLf5BtCVNhYwVrlQhrKdYQnoIlTGc6XXU0LR32HGahEHaZDgNmZsLi6I5VUV
XQaKd9SZWozIqwaA1vWisUlJXKyCSkEqK/9fukaa7AyVwrcyRUNttig6Hwh+rbXL
czUxZZaou2TQeDOwtuOOuguNNl2TNo3Xg84JxYxhgBV/LO0+QooTt2s4g8M2BB4y
lbQoZeU9xxG+wsvr7Tq/mt3FfMVMqApaFR//G1VU0n/SeoS+ktF82XyJz8CEN/kn
TPXJUvjlvmnJHQaFZ1CC
=WZJS
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-11-14 22:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-08 10:38 [Openvpn-devel] Remove support for key-method 1 from master/2.4 Steffan Karger
2016-11-14 19:58 ` [Openvpn-devel] [PATCH] Deprecate key-method 1 Steffan Karger
2016-11-14 20:06 ` [Openvpn-devel] [PATCH v2] " Steffan Karger
2016-11-14 21:35 ` David Sommerseth
2016-11-14 21:42 ` Steffan Karger
2016-11-14 22:04 ` David Sommerseth
2016-11-14 22:10 ` [Openvpn-devel] [PATCH applied] " David Sommerseth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.