Further restrict default TLS cipher list
PATCH 1/1 Further restrict default TLS cipher list
In the past years, the internet has been moving forward wrt deprecating older and less secure ciphers. Let's follow this example in OpenVPN and further restrict the default list of negotiable TLS ciphers.
Compared to earlier, this disables the following:
* Ciphers in the LOW and MEDIUM security cipher list of OpenSSL The LOW suite will be completely removed from OpenSSL in 1.1.0, the MEDIUM suite contains ciphers like RC4 and SEED.
* Ciphers that do not provide forward secrecy (static DH/ECDH keys)
* DSA private keys (rarely used, and usually restricted to 1024 bits)
--- doc/openvpn.8 | 4 +++- src/openvpn/ssl_openssl.c | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-)
doc/openvpn.8 +3 -1
@@ -4696,7 +4696,9 @@ your VPN connection. But it is also easy to unwittingly use it to carefully align a gun with your foot, or just break your connection. Use with care! The default for \-\-tls\-cipher is to use PolarSSL's default cipher list -when using PolarSSL or "DEFAULT:!EXP:!PSK:!SRP:!kRSA" when using OpenSSL. +when using PolarSSL or +"DEFAULT:!EXP:!LOW:!MEDIUM:!kDH:!kECDH:!DSS:!PSK:!SRP:!kRSA" when using +OpenSSL. .\"********************************************************* .TP .B \-\-tls\-timeout n
src/openvpn/ssl_openssl.c +12 -2
@@ -272,8 +272,18 @@ tls_ctx_restrict_ciphers(struct tls_root_ctx *ctx, const char *ciphers) {if (ciphers ==NULL ) { -/* Use sane default (disable export, and unsupported cipher modes) */ -if (!SSL_CTX_set_cipher_list (ctx->ctx,"DEFAULT:!EXP:!PSK:!SRP:!kRSA" )) +/* Use sane default TLS cipher list */ +if (!SSL_CTX_set_cipher_list (ctx->ctx, +/* Use openssl's default list as a basis */ +"DEFAULT" +/* Disable export ciphers and openssl's 'low' and 'medium' ciphers */ +":!EXP:!LOW:!MEDIUM" +/* Disable static (EC)DH keys (no forward secrecy) */ +":!kDH:!kECDH" +/* Disable DSA private keys */ +":!DSS" +/* Disable unsupported TLS modes */ +":!PSK:!SRP:!kRSA" ))crypto_msg (M_FATAL ,"Failed to set default TLS cipher list." );return ; }
Signature · 1 line
2.5.0
Am 17.04.16 um 18:22 schrieb Steffan Karger:
Quoted 10 lines
In the past years, the internet has been moving forward wrt deprecating older and less secure ciphers. Let's follow this example in OpenVPN and further restrict the default list of negotiable TLS ciphers.
Compared to earlier, this disables the following:
* Ciphers in the LOW and MEDIUM security cipher list of OpenSSL The LOW suite will be completely removed from OpenSSL in 1.1.0, the MEDIUM suite contains ciphers like RC4 and SEED.
* Ciphers that do not provide forward secrecy (static DH/ECDH keys)
* DSA private keys (rarely used, and usually restricted to 1024 bits)
ACK from me. The code looks good and the change makes sense to me.
Arne
PATCH v2 1/1 Further restrict default cipher list
In the past years, the internet has been moving forward wrt deprecating older and less secure ciphers. Let's follow this example in OpenVPN and further restrict the default list of negotiable TLS ciphers.
Compared to earlier, this disables the following:
* Ciphers in the LOW and MEDIUM security cipher list of OpenSSL The LOW suite will be completely removed from OpenSSL in 1.1.0, the MEDIUM suite contains ciphers like RC4 and SEED.
* Ciphers that do not provide forward secrecy (static DH/ECDH keys)
* DSA private keys (rarely used, and usually restricted to 1024 bits)
v2: add Changes.rst entry.
--- doc/openvpn.8 | 4 +++- src/openvpn/ssl_openssl.c | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-)
doc/openvpn.8 +3 -1
@@ -4696,7 +4696,9 @@ your VPN connection. But it is also easy to unwittingly use it to carefully align a gun with your foot, or just break your connection. Use with care! The default for \-\-tls\-cipher is to use PolarSSL's default cipher list -when using PolarSSL or "DEFAULT:!EXP:!PSK:!SRP:!kRSA" when using OpenSSL. +when using PolarSSL or +"DEFAULT:!EXP:!LOW:!MEDIUM:!kDH:!kECDH:!DSS:!PSK:!SRP:!kRSA" when using +OpenSSL. .\"********************************************************* .TP .B \-\-tls\-timeout n
src/openvpn/ssl_openssl.c +12 -2
@@ -272,8 +272,18 @@ tls_ctx_restrict_ciphers(struct tls_root_ctx *ctx, const char *ciphers) {if (ciphers ==NULL ) { -/* Use sane default (disable export, and unsupported cipher modes) */ -if (!SSL_CTX_set_cipher_list (ctx->ctx,"DEFAULT:!EXP:!PSK:!SRP:!kRSA" )) +/* Use sane default TLS cipher list */ +if (!SSL_CTX_set_cipher_list (ctx->ctx, +/* Use openssl's default list as a basis */ +"DEFAULT" +/* Disable export ciphers and openssl's 'low' and 'medium' ciphers */ +":!EXP:!LOW:!MEDIUM" +/* Disable static (EC)DH keys (no forward secrecy) */ +":!kDH:!kECDH" +/* Disable DSA private keys */ +":!DSS" +/* Disable unsupported TLS modes */ +":!PSK:!SRP:!kRSA" ))crypto_msg (M_FATAL ,"Failed to set default TLS cipher list." );return ; }
Signature · 1 line
2.5.0
PATCH v2 1/1 Further restrict default cipher list
In reply to Arne SchwabeIn the past years, the internet has been moving forward wrt deprecating older and less secure ciphers. Let's follow this example in OpenVPN and further restrict the default list of negotiable TLS ciphers.
Compared to earlier, this disables the following:
* Ciphers in the LOW and MEDIUM security cipher list of OpenSSL The LOW suite will be completely removed from OpenSSL in 1.1.0, the MEDIUM suite contains ciphers like RC4 and SEED.
* Ciphers that do not provide forward secrecy (static DH/ECDH keys)
* DSA private keys (rarely used, and usually restricted to 1024 bits)
v2: added Changes.rst entry.
--- Changes.rst | 6 ++++++ doc/openvpn.8 | 4 +++- src/openvpn/ssl_openssl.c | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-)
Changes.rst +6 -0
@@ -89,6 +89,12 @@ User-visible Changes environment to be equal to the ones exported by OpenSSL builds, namely the certificate fingerprint (was the hash of the 'to be signed' data). +- Stricter default TLS cipher list (override with ``--tls-cipher``), that now + also disables: + + * Non-ephemeral key exchange using static (EC)DH keys + * DSS private keys + Maintainer-visible changes --------------------------
doc/openvpn.8 +3 -1
@@ -4696,7 +4696,9 @@ your VPN connection. But it is also easy to unwittingly use it to carefully align a gun with your foot, or just break your connection. Use with care! The default for \-\-tls\-cipher is to use PolarSSL's default cipher list -when using PolarSSL or "DEFAULT:!EXP:!PSK:!SRP:!kRSA" when using OpenSSL. +when using PolarSSL or +"DEFAULT:!EXP:!LOW:!MEDIUM:!kDH:!kECDH:!DSS:!PSK:!SRP:!kRSA" when using +OpenSSL. .\"********************************************************* .TP .B \-\-tls\-timeout n
src/openvpn/ssl_openssl.c +12 -2
@@ -272,8 +272,18 @@ tls_ctx_restrict_ciphers(struct tls_root_ctx *ctx, const char *ciphers) {if (ciphers ==NULL ) { -/* Use sane default (disable export, and unsupported cipher modes) */ -if (!SSL_CTX_set_cipher_list (ctx->ctx,"DEFAULT:!EXP:!PSK:!SRP:!kRSA" )) +/* Use sane default TLS cipher list */ +if (!SSL_CTX_set_cipher_list (ctx->ctx, +/* Use openssl's default list as a basis */ +"DEFAULT" +/* Disable export ciphers and openssl's 'low' and 'medium' ciphers */ +":!EXP:!LOW:!MEDIUM" +/* Disable static (EC)DH keys (no forward secrecy) */ +":!kDH:!kECDH" +/* Disable DSA private keys */ +":!DSS" +/* Disable unsupported TLS modes */ +":!PSK:!SRP:!kRSA" ))crypto_msg (M_FATAL ,"Failed to set default TLS cipher list." );return ; }
Signature · 1 line
2.5.0
[Openvpn-devel] [PATCH applied] Re: Further restrict default cipher list
Your patch has been applied to the master branch.
(Changes.rst hunk massaged in, as the context did not match - one other patch missing in my tree)
commit a44eac2bf47416b35609c37b10eb803dd61945ed (master)
Author: Steffan Karger Date: Sun Apr 17 20:32:07 2016 +0200
Further restrict default cipher list
Signed-off-by: Steffan Karger <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11457
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering