Require minimum OpenSSL 1.0.1
PATCH 1/1 Require minimum OpenSSL 1.0.1
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8. This also makes it possible to remove a few workaronds which was needed earlier, as well as some left overs from v0.9.6.
This also makes ./configure really stop running unless a new enough OpenSSL library is found.
Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping openssl-1.0.1e.
--- configure.ac | 6 +++--- doc/openvpn.8 | 1 - .../keying-material-exporter-demo/keyingmaterialexporter.c | 3 +-- sample/sample-plugins/log/log_v3.c | 3 +-- src/openvpn/ssl_openssl.c | 3 --- src/openvpn/ssl_openssl.h | 11 ----------- src/openvpn/ssl_verify_openssl.c | 6 ++---- 7 files changed, 7 insertions(+), 26 deletions(-)
configure.ac +3 -3
@@ -859,9 +859,9 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then # if the user did not explicitly specify flags, try to autodetect PKG_CHECK_MODULES( [OPENSSL], - [libcrypto >= 0.9.8, libssl >= 0.9.8], - [have_openssl="yes"], - [have_openssl="no"] # Provide if-not-found to prevent erroring out + [libcrypto >= 1.0.1, libssl >= 1.0.1], + [have_openssl="yes"], + [AC_MSG_ERROR([Minimum supported OpenSSL version is 1.0.1])] ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto}
doc/openvpn.8 +0 -1
@@ -2773,7 +2773,6 @@ OPENVPN_PLUGIN_TLS_FINAL callback. Note that exporter labels have the potential to collide with existing PRF labels. In order to prevent this, labels MUST begin with "EXPORTER". -This option requires OpenSSL 1.0.1 or newer. .\"********************************************************* .SS Server Mode Starting with OpenVPN 2.0, a multi-client TCP/UDP server mode
sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c +1 -2
@@ -143,8 +143,7 @@ session_user_set(struct session *sess, X509 *x509) {continue ; } -/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ -unsigned char *buf = (unsigned char *)1 ; +unsigned char *buf =NULL ;if (ASN1_STRING_to_UTF8 (&buf, val) <=0 ) {continue ;
sample/sample-plugins/log/log_v3.c +1 -2
@@ -197,7 +197,7 @@ x509_print_info(X509 *x509crt)X509_NAME *x509_name;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ; x509_name =X509_get_subject_name (x509crt); n =X509_NAME_entry_count (x509_name);
@@ -228,7 +228,6 @@ x509_print_info(X509 *x509crt) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ if (ASN1_STRING_to_UTF8 (&buf, val) <=0 ) {continue ;
src/openvpn/ssl_openssl.c +0 -3
@@ -254,10 +254,7 @@ tls_ctx_set_options(struct tls_root_ctx *ctx, unsigned int ssl_flags) sslopt |= SSL_OP_NO_TLSv1_2; }#endif -#ifdef SSL_OP_NO_COMPRESSION -/* Disable compression - flag not available in OpenSSL 0.9.8 */ sslopt |=SSL_OP_NO_COMPRESSION ; -#endif SSL_CTX_set_options (ctx->ctx, sslopt); }
src/openvpn/ssl_openssl.h +0 -11
@@ -33,17 +33,6 @@#include <openssl/ssl.h> /** -* SSL_OP_NO_TICKET tells OpenSSL to disable "stateless session resumption", -* as this is something we do not want nor need, but could potentially be -* used for a future attack. For compatibility reasons we keep building if the -* OpenSSL version is too old (pre-0.9.8f) to support stateless session -* resumption (and the accompanying SSL_OP_NO_TICKET flag). -*/ -#ifndef SSL_OP_NO_TICKET -#define SSL_OP_NO_TICKET 0 -#endif - -/** * Structure that wraps the TLS context. Contents differ depending on the * SSL library used. */
src/openvpn/ssl_verify_openssl.c +2 -4
@@ -458,8 +458,7 @@ x509_setenv_track(const struct x509_track *xt, struct env_set *es, const int depif (ent) {ASN1_STRING *val =X509_NAME_ENTRY_get_data (ent); -unsigned char *buf; - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ +unsigned char *buf =NULL ;if (ASN1_STRING_to_UTF8 (&buf, val) >0 ) {do_setenv_x509 (es, xt->name, (char *)buf, depth);
@@ -514,7 +513,7 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert)ASN1_STRING *val;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ;char *name_expand;size_t name_expand_size;X509_NAME *x509 =X509_get_subject_name (peer_cert);
@@ -547,7 +546,6 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ if (ASN1_STRING_to_UTF8 (&buf, val) <=0 ) {continue ;
Signature · 1 line
2.11.0
Hi,
Quoted 147 lines · David Sommerseth
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8. This also makes it possible to remove a few workaronds which was needed earlier, as well as some left overs from v0.9.6.
This also makes ./configure really stop running unless a new enough OpenSSL library is found.
Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping openssl-1.0.1e.
Signed-off-by David Sommerseth <[email protected]...>--- configure.ac | 6 +++--- doc/openvpn.8 | 1 - .../keying-material-exporter-demo/keyingmaterialexporter.c | 3 +-- sample/sample-plugins/log/log_v3.c | 3 +-- src/openvpn/ssl_openssl.c | 3 --- src/openvpn/ssl_openssl.h | 11 ----------- src/openvpn/ssl_verify_openssl.c | 6 ++---- 7 files changed, 7 insertions(+), 26 deletions(-)configure.ac +3
-3@@ -859,9 +859,9 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then # if the user did not explicitly specify flags, try to autodetect PKG_CHECK_MODULES( [OPENSSL], - [libcrypto >= 0.9.8, libssl >= 0.9.8], - [have_openssl="yes"], - [have_openssl="no"] # Provide if-not-found to prevent erroring out + [libcrypto >= 1.0.1, libssl >= 1.0.1], + [have_openssl="yes"], + [AC_MSG_ERROR([Minimum supported OpenSSL version is 1.0.1])] ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto}doc/openvpn.8 +0
-1@@ -2773,7 +2773,6 @@ OPENVPN_PLUGIN_TLS_FINAL callback. Note that exporter labels have the potential to collide with existing PRF labels. In order to prevent this, labels MUST begin with "EXPORTER". -This option requires OpenSSL 1.0.1 or newer. .\"********************************************************* .SS Server Mode Starting with OpenVPN 2.0, a multi-client TCP/UDP server modesample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c +1
-2@@ -143,8 +143,7 @@ session_user_set(struct session *sess, X509 *x509) {continue ; } -/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ -unsigned char *buf = (unsigned char *)1 ; +unsigned char *buf =NULL ;if (ASN1_STRING_to_UTF8 (&buf, val) <=0 ) {continue ;sample/sample-plugins/log/log_v3.c +1
-2@@ -197,7 +197,7 @@ x509_print_info(X509 *x509crt)X509_NAME *x509_name;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ; x509_name =X509_get_subject_name (x509crt); n =X509_NAME_entry_count (x509_name);@@ -228,7 +228,6 @@ x509_print_info(X509 *x509crt) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ if (ASN1_STRING_to_UTF8 (&buf, val) <=0 ) {continue ;src/openvpn/ssl_openssl.c +0
-3@@ -254,10 +254,7 @@ tls_ctx_set_options(struct tls_root_ctx *ctx, unsigned int ssl_flags) sslopt |= SSL_OP_NO_TLSv1_2; }#endif -#ifdef SSL_OP_NO_COMPRESSION -/* Disable compression - flag not available in OpenSSL 0.9.8 */ sslopt |=SSL_OP_NO_COMPRESSION ; -#endif SSL_CTX_set_options (ctx->ctx, sslopt); }src/openvpn/ssl_openssl.h +0
-11@@ -33,17 +33,6 @@#include <openssl/ssl.h> /** -* SSL_OP_NO_TICKET tells OpenSSL to disable "stateless session resumption", -* as this is something we do not want nor need, but could potentially be -* used for a future attack. For compatibility reasons we keep building if the -* OpenSSL version is too old (pre-0.9.8f) to support stateless session -* resumption (and the accompanying SSL_OP_NO_TICKET flag). -*/ -#ifndef SSL_OP_NO_TICKET -#define SSL_OP_NO_TICKET 0 -#endif - -/** * Structure that wraps the TLS context. Contents differ depending on the * SSL library used. */ src/openvpn/ssl_verify_openssl.c +2
-3@@ -458,8 +458,7 @@ x509_setenv_track(const struct x509_track *xt, struct env_set *es, const int depif (ent) {ASN1_STRING *val =X509_NAME_ENTRY_get_data (ent); -unsigned char *buf; - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ +unsigned char *buf =NULL ;if (ASN1_STRING_to_UTF8 (&buf, val) >0 ) {do_setenv_x509 (es, xt->name, (char *)buf, depth);@@ -514,7 +513,7 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert)ASN1_STRING *val;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ;char *name_expand;size_t name_expand_size;X509_NAME *x509 =X509_get_subject_name (peer_cert);
src/openvpn/ssl_verify_openssl.c x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) · line 551
Quoted 7 lines
src/openvpn/ssl_verify_openssl.c +0
-1@@ -547,7 +546,6 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires this workaround */ if (ASN1_STRING_to_UTF8 (&buf, val) <=0 ) {continue ;
For master: ACK.
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
-Steffan
Quoted 24 lines · Steffan Karger
Hi,
Quoted 21 lines · David Sommerseth
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8. This also makes it possible to remove a few workaronds which was needed earlier, as well as some left overs from v0.9.6.
This also makes ./configure really stop running unless a new enough OpenSSL library is found.
Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping openssl-1.0.1e.
Signed-off-by David Sommerseth <[email protected]...>--- configure.ac | 6 +++--- doc/openvpn.8 | 1 - .../keying-material-exporter-demo/keyingmaterialexporter.c | 3 +-- sample/sample-plugins/log/log_v3.c | 3 +-- src/openvpn/ssl_openssl.c | 3 --- src/openvpn/ssl_openssl.h | 11 ----------- src/openvpn/ssl_verify_openssl.c | 6 ++---- 7 files changed, 7 insertions(+), 26 deletions(-)
[...snip...]
Quoted 5 lines
For master: ACK.
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
While it is James who insisted on RHEL being the oldest supported distro many years ago, I have no issues with keeping SLES *or* RHEL as the oldest supported distro, in regards to package dependencies.
Do we know if we have a large group of SLES 11 users? Initially I thought it was related to OpenVPN-NL ... until I recalled that OPenVPN-NL should be built against mbed TLS :)
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Technologies, Inc
Am 11.04.2017 um 23:56 schrieb David Sommerseth:
Quoted 10 lines · Steffan Karger
Quoted 2 lines
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
While it is James who insisted on RHEL being the oldest supported distro many years ago, I have no issues with keeping SLES *or* RHEL as the oldest supported distro, in regards to package dependencies.
Do we know if we have a large group of SLES 11 users? Initially I thought it was related to OpenVPN-NL ... until I recalled that OPenVPN-NL should be built against mbed TLS :)
How many of the enterprise users will want to update and then can't be bothered to install a newer OpenSSL into /opt?
Older OpenSSL versions are EOL, I don't think the community edition should waste any energy on support such stuff. I'd even discontinue 1.0.1 support on master for the same reason because 1.0.1 is also past the end of its life.
Quoted 12 lines · Matthias Andree
Am 11.04.2017 um 23:56 schrieb David Sommerseth:
Quoted 10 lines · Steffan Karger
Quoted 2 lines
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
While it is James who insisted on RHEL being the oldest supported distro many years ago, I have no issues with keeping SLES *or* RHEL as the oldest supported distro, in regards to package dependencies.
Do we know if we have a large group of SLES 11 users? Initially I thought it was related to OpenVPN-NL ... until I recalled that OPenVPN-NL should be built against mbed TLS :)
Quoted 6 lines
How many of the enterprise users will want to update and then can't be bothered to install a newer OpenSSL into /opt?
Older OpenSSL versions are EOL, I don't think the community edition should waste any energy on support such stuff. I'd even discontinue 1.0.1 support on master for the same reason because 1.0.1 is also past the end of its life.
On Enterprise Linux (at least RHEL and SLES), OpenSSL 1.0.1 *is* supported by the distro. I can't speak for SUSE, but I know for a fact that Red Hat have people ensuring important OpenSSL issues are backported and fixed during the life time of RHEL. So on RHEL 5, OpenSSL 0.9.8 was even fully supported and updated all up until March 31, 2017. But it isn't supported by the OpenSSL community.
And the packaging side of side-loading libraries into /opt will also be a complete mess. *EL distributions are updated continuously for at least 7-10 years. Those basing their environment on these distributions will not be bothered manually maintaining an /opt based OpenSSL version; what will happen is that they make it run once and forgets to update it until OpenVPN installs breaks again. And if the OpenVPN package maintainer need to maintain an /opt based OpenSSL package on-top of that and to ensure /usr/sbin/openvpn picks the right OpenSSL version .... nah, that's not going to fly well.
So as long as the *EL distributions keep their OpenSSL packages updated and backports fixes ... I see no reason why we shouldn't leverage on their work. At least for RHEL, every RPM update goes through several QE steps, where regression testing happens for a lot of known issues in addition to package install/upgrade/downgrade/uninstall tests. So the long-term package stability should be reasonably high.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Technologies, Inc
Hi,
Quoted 30 lines · David Sommerseth
Quoted 22 lines · Steffan Karger
Quoted 21 lines · David Sommerseth
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8. This also makes it possible to remove a few workaronds which was needed earlier, as well as some left overs from v0.9.6.
This also makes ./configure really stop running unless a new enough OpenSSL library is found.
Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping openssl-1.0.1e.
Signed-off-by David Sommerseth <[email protected]...>--- configure.ac | 6 +++--- doc/openvpn.8 | 1 - .../keying-material-exporter-demo/keyingmaterialexporter.c | 3 +-- sample/sample-plugins/log/log_v3.c | 3 +-- src/openvpn/ssl_openssl.c | 3 --- src/openvpn/ssl_openssl.h | 11 ----------- src/openvpn/ssl_verify_openssl.c | 6 ++---- 7 files changed, 7 insertions(+), 26 deletions(-)[...snip...]
Quoted 5 lines
For master: ACK.
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
Quoted 7 lines
While it is James who insisted on RHEL being the oldest supported distro many years ago, I have no issues with keeping SLES *or* RHEL as the oldest supported distro, in regards to package dependencies.
Do we know if we have a large group of SLES 11 users? Initially I thought it was related to OpenVPN-NL ... until I recalled that OPenVPN-NL should be built against mbed TLS :)
Well, I don't care much for legacy support (and for OpenVPN-NL, I don't care at all, indeed). I consider you to be our authority on what Linux platforms we want to support. Just wanted to point this out so you could decide on what to do for 2.4. I'm fine with whatever you decide here.
-Steffan
Quoted 185 lines
Hi,
Quoted 175 lines · David Sommerseth
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8. This also makes it possible to remove a few workaronds which was needed earlier, as well as some left overs from v0.9.6.
This also makes ./configure really stop running unless a new enough OpenSSL library is found.
Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping openssl-1.0.1e.
Signed-off-by David Sommerseth <[email protected]...>--- configure.ac | 6 +++--- doc/openvpn.8 | 1 - .../keying-material-exporter-demo/keyingmaterialexporter.c | 3 +-- sample/sample-plugins/log/log_v3.c | 3 +-- src/openvpn/ssl_openssl.c | 3 --- src/openvpn/ssl_openssl.h | 11 ----------- src/openvpn/ssl_verify_openssl.c | 6 ++---- 7 files changed, 7 insertions(+), 26 deletions(-)configure.ac +0
-0@@ -859,9 +859,9 @@ if test "${enable_crypto}" = "yes" -a"${with_crypto_library}" = "openssl"; then
configure.ac +3
-3# if the user did not explicitly specify flags, try to autodetect PKG_CHECK_MODULES( [OPENSSL], - [libcrypto >= 0.9.8, libssl >= 0.9.8], - [have_openssl="yes"], - [have_openssl="no"] # Provide if-not-found to prevent erroring out + [libcrypto >= 1.0.1, libssl >= 1.0.1], + [have_openssl="yes"], + [AC_MSG_ERROR([Minimum supported OpenSSL version is 1.0.1])] ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto}doc/openvpn.8 +0
-0@@ -2773,7 +2773,6 @@ OPENVPN_PLUGIN_TLS_FINAL callback. Note that exporter labels have the potential to collide with existingPRF
labels. In order to prevent this, labels MUST begin with "EXPORTER".-This option requires OpenSSL 1.0.1 or newer.
.\"*********************************************************
.SS Server Mode
Starting with OpenVPN 2.0, a multi-client TCP/UDP server mode
diff --gita/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.cb/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.cindex 177977d..a72b374 100644
---a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c
+++b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.cdoc/openvpn.8 +0
-1@@ -143,8 +143,7 @@ session_user_set(struct session *sess, X509 *x509) { continue; } - /* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires thisworkaround */
doc/openvpn.8 +1
-1- unsigned char *buf = (unsigned char *)1; + unsigned char *buf = NULL; if (ASN1_STRING_to_UTF8(&buf, val) <= 0) { continue;sample/sample-plugins/log/log_v3.c +1
-2@@ -197,7 +197,7 @@ x509_print_info(X509 *x509crt)X509_NAME *x509_name;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ; x509_name =X509_get_subject_name (x509crt); n =X509_NAME_entry_count (x509_name);@@ -228,7 +228,6 @@ x509_print_info(X509 *x509crt) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b
ASN1_STRING_to_UTF8requires this workaround */if (ASN1_STRING_to_UTF8(&buf, val) <= 0) { continue;src/openvpn/ssl_openssl.c +0
-3@@ -254,10 +254,7 @@ tls_ctx_set_options(struct tls_root_ctx *ctx, unsigned int ssl_flags) sslopt |= SSL_OP_NO_TLSv1_2; }#endif -#ifdef SSL_OP_NO_COMPRESSION -/* Disable compression - flag not available in OpenSSL 0.9.8 */ sslopt |=SSL_OP_NO_COMPRESSION ; -#endif SSL_CTX_set_options (ctx->ctx, sslopt); }src/openvpn/ssl_openssl.h +0
-2@@ -33,17 +33,6 @@#include <openssl/ssl.h> /** -* SSL_OP_NO_TICKET tells OpenSSL to disable "stateless session resumption", -* as this is something we do not want nor need, but could potentially be
- * used for a future attack. For compatibility reasons we keep building if the
- * OpenSSL version is too old (pre-0.9.8f) to support stateless session
- * resumption (and the accompanyingSSL_OP_NO_TICKETflag).
- */src/openvpn/ssl_openssl.h +0
-5-#ifndef SSL_OP_NO_TICKET -#define SSL_OP_NO_TICKET 0 -#endif - -/** * Structure that wraps the TLS context. Contents differ depending on the
* SSL library used.
*/src/openvpn/ssl_verify_openssl.c +0
-0@@ -458,8 +458,7 @@ x509_setenv_track(const struct x509_track *xt,struct
env_set*es, const int dep
if (ent)
{
ASN1_STRING*val =X509_NAME_ENTRY_get_data(ent);src/openvpn/ssl_verify_openssl.c +0
-2-unsigned char *buf; - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b
ASN1_STRING_to_UTF8requires this workaround */+ unsigned char *buf = NULL; if (ASN1_STRING_to_UTF8(&buf, val) > 0) { do_setenv_x509(es, xt->name, (char*)buf, depth);
src/openvpn/ssl_verify_openssl.c +1
-1@@ -514,7 +513,7 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) ASN1_STRING *val;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ;char *name_expand;size_t name_expand_size;X509_NAME *x509 = X509_get_subject_name(peer_cert);src/openvpn/ssl_verify_openssl.c +0
-1@@ -547,7 +546,6 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b
ASN1_STRING_to_UTF8requires this workaround */Quoted 4 lines
if (ASN1_STRING_to_UTF8(&buf, val) <= 0) { continue;For master: ACK.
Quoted 2 lines
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
To make the picture complete, there is also the "extended" support for EL5 for paying customers. For both RedHat EL5 and Oracle's EL5 clone extended support ends somewhere in 2020.
Regards,
Simon
Quoted 185 lines · Simon Matter
Quoted 185 lines
Hi,
Quoted 175 lines · David Sommerseth
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8. This also makes it possible to remove a few workaronds which was needed earlier, as well as some left overs from v0.9.6.
This also makes ./configure really stop running unless a new enough OpenSSL library is found.
Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping openssl-1.0.1e.
Signed-off-by David Sommerseth <[email protected]...>--- configure.ac | 6 +++--- doc/openvpn.8 | 1 - .../keying-material-exporter-demo/keyingmaterialexporter.c | 3 +-- sample/sample-plugins/log/log_v3.c | 3 +-- src/openvpn/ssl_openssl.c | 3 --- src/openvpn/ssl_openssl.h | 11 ----------- src/openvpn/ssl_verify_openssl.c | 6 ++---- 7 files changed, 7 insertions(+), 26 deletions(-)configure.ac +0
-0@@ -859,9 +859,9 @@ if test "${enable_crypto}" = "yes" -a"${with_crypto_library}" = "openssl"; then
configure.ac +3
-3# if the user did not explicitly specify flags, try to autodetect PKG_CHECK_MODULES( [OPENSSL], - [libcrypto >= 0.9.8, libssl >= 0.9.8], - [have_openssl="yes"], - [have_openssl="no"] # Provide if-not-found to prevent erroring out + [libcrypto >= 1.0.1, libssl >= 1.0.1], + [have_openssl="yes"], + [AC_MSG_ERROR([Minimum supported OpenSSL version is 1.0.1])] ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto}doc/openvpn.8 +0
-0@@ -2773,7 +2773,6 @@ OPENVPN_PLUGIN_TLS_FINAL callback. Note that exporter labels have the potential to collide with existingPRF
labels. In order to prevent this, labels MUST begin with "EXPORTER".-This option requires OpenSSL 1.0.1 or newer.
.\"*********************************************************
.SS Server Mode
Starting with OpenVPN 2.0, a multi-client TCP/UDP server mode
diff --gita/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.cb/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.cindex 177977d..a72b374 100644
---a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c
+++b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.cdoc/openvpn.8 +0
-1@@ -143,8 +143,7 @@ session_user_set(struct session *sess, X509 *x509) { continue; } - /* bug in OpenSSL 0.9.6b ASN1_STRING_to_UTF8 requires thisworkaround */
doc/openvpn.8 +1
-1- unsigned char *buf = (unsigned char *)1; + unsigned char *buf = NULL; if (ASN1_STRING_to_UTF8(&buf, val) <= 0) { continue;sample/sample-plugins/log/log_v3.c +1
-2@@ -197,7 +197,7 @@ x509_print_info(X509 *x509crt)X509_NAME *x509_name;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ; x509_name =X509_get_subject_name (x509crt); n =X509_NAME_entry_count (x509_name);@@ -228,7 +228,6 @@ x509_print_info(X509 *x509crt) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b
ASN1_STRING_to_UTF8requires this workaround */if (ASN1_STRING_to_UTF8(&buf, val) <= 0) { continue;src/openvpn/ssl_openssl.c +0
-3@@ -254,10 +254,7 @@ tls_ctx_set_options(struct tls_root_ctx *ctx, unsigned int ssl_flags) sslopt |= SSL_OP_NO_TLSv1_2; }#endif -#ifdef SSL_OP_NO_COMPRESSION -/* Disable compression - flag not available in OpenSSL 0.9.8 */ sslopt |=SSL_OP_NO_COMPRESSION ; -#endif SSL_CTX_set_options (ctx->ctx, sslopt); }src/openvpn/ssl_openssl.h +0
-2@@ -33,17 +33,6 @@#include <openssl/ssl.h> /** -* SSL_OP_NO_TICKET tells OpenSSL to disable "stateless session resumption", -* as this is something we do not want nor need, but could potentially be
- * used for a future attack. For compatibility reasons we keep building if the
- * OpenSSL version is too old (pre-0.9.8f) to support stateless session
- * resumption (and the accompanyingSSL_OP_NO_TICKETflag).
- */src/openvpn/ssl_openssl.h +0
-5-#ifndef SSL_OP_NO_TICKET -#define SSL_OP_NO_TICKET 0 -#endif - -/** * Structure that wraps the TLS context. Contents differ depending on the
* SSL library used.
*/src/openvpn/ssl_verify_openssl.c +0
-0@@ -458,8 +458,7 @@ x509_setenv_track(const struct x509_track *xt,struct
env_set*es, const int dep
if (ent)
{
ASN1_STRING*val =X509_NAME_ENTRY_get_data(ent);src/openvpn/ssl_verify_openssl.c +0
-2-unsigned char *buf; - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b
ASN1_STRING_to_UTF8requires this workaround */+ unsigned char *buf = NULL; if (ASN1_STRING_to_UTF8(&buf, val) > 0) { do_setenv_x509(es, xt->name, (char*)buf, depth);
src/openvpn/ssl_verify_openssl.c +1
-1@@ -514,7 +513,7 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) ASN1_STRING *val;X509_NAME_ENTRY *ent;const char *objbuf; -unsigned char *buf; +unsigned char *buf =NULL ;char *name_expand;size_t name_expand_size;X509_NAME *x509 = X509_get_subject_name(peer_cert);src/openvpn/ssl_verify_openssl.c +0
-1@@ -547,7 +546,6 @@ x509_setenv(struct env_set *es, int cert_depth, openvpn_x509_cert_t *peer_cert) {continue ; } - buf = (unsigned char *)1 ;/* bug in OpenSSL 0.9.6b
ASN1_STRING_to_UTF8requires this workaround */Quoted 4 lines
if (ASN1_STRING_to_UTF8(&buf, val) <= 0) { continue;For master: ACK.
Quoted 6 lines
Quoted 2 lines
For release/2.4: I wonder whether we need to keep 0.9.8 support, as SLES11 still ships with 0.9.8h, and has general support until 31 Mar 2019.
To make the picture complete, there is also the "extended" support for EL5 for paying customers. For both RedHat EL5 and Oracle's EL5 clone extended support ends somewhere in 2020.
That is correct. But we decided that is for really special installs. Those users also pay an incredible high premium to Red Hat (and I wouldn't expect Oracle to be different) to get access to the ELS (Extended Life-cycle Support). IIRC, it is also something not all customers are eligible to buy. I don't even think you can buy ELS from their web-shop, you have to go through a sales contact.
<https://access.redhat.com/support/policy/updates/errata/#Extended_Life_Cycle_Phase>
The ELS is also only supported on a very restricted set of packages:
<https://access.redhat.com/articles/2901071>
So considering that this isn't something being too common, we decided a long time ago it isn't worth the hassle for us. We anyway do support OpenVPN v2.3 for a while more, which will work on EL5. So if someone really wants to stay on EL5 longer, they need to accept that they won't get the newest OpenVPN versions.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Technologies, Inc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Your patch has been applied to the master branch.
commit 039a89c331e9b7998d8047ec72144097f7c5826a
Author: David Sommerseth Date: Tue Apr 11 19:31:33 2017 +0200
Require minimum OpenSSL 1.0.1
Signed-off-by: David Sommerseth <[email protected]...>
Acked-by: Steffan Karger <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg14441.html
Signed-off-by: David Sommerseth <[email protected]...>- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBCAAGBQJY7U/DAAoJEIbPlEyWcf3y/pUQAIY5NJWnRs+jYIiWSoLrPFrB PDQf4J9BO2cRFvQTvtGzCUpv7CY+uy8dM6NeGKJ3dX4HLtGn7s7gtSZpecu1gql5 Z2aOXxYATq1axyk6KfEDIpElIauT6Jh52H5Sop5RhnnMnqkSetOyxfTUQGbINkdz Z6gjt9iYUOb0zFK2JgTQUUpr+dHMYciZuirm/u+f2x06ISdSjtjxpn2eTvC0fLcN 9z3EvfalgYfHhDk1g+d86/Y+OPHmvY+1E5iiXfDy4oInODPs8FomjwGorbYAr7g7 sT44bor7G5mNlCCrVY4gR1djv5Rt6w8ac2EQdTyRkLIhCyZxAWRfyjNdHyMsy8M7 UawM50CtSPleeuTyVmVWh0ixVBupW+aAAUZQijp93rlfrh2ziteXUJZDrxc4LWsi URohP71gCnnZXlJBAvEYNoY0CDqnLAv9jESh1PKX7WXtM/pymDDoCatV0WPNKN4P lsUGU/+6tollPjGFOgxmCuc1KGymF47wfOhejWtUMonOpjt7cLh1qV48NvByMhIM SoAq5a390XHnjDLtVeeigxcgoYYtQLAIROO3rwwyXYzigF8gLd++Fjzr0NVC1EIy 62ho/BjhOMfxrdz5OXFHjeit7H/5pdy2kcqOR12oSY7m+Rlo9xwTdnOGTbZ/27NN SBoEEKOAjM1BKFnVCrL0
=vHtE
-----END PGP SIGNATURE-----
Hi,
configure.ac if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then · line 864
Quoted 12 lines · David Sommerseth
configure.ac +3
-3@@ -859,9 +859,9 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then # if the user did not explicitly specify flags, try to autodetect PKG_CHECK_MODULES( [OPENSSL], - [libcrypto >= 0.9.8, libssl >= 0.9.8], - [have_openssl="yes"], - [have_openssl="no"] # Provide if-not-found to prevent erroring out + [libcrypto >= 1.0.1, libssl >= 1.0.1], + [have_openssl="yes"], + [AC_MSG_ERROR([Minimum supported OpenSSL version is 1.0.1])]
While this *looks* harmless, it has non-obvious side effects - from what I observe, it breaks compilation on all platforms that do not have pkg_config for OpenSSL, which was not a requirement earlier (and there even was a comment to that extent, "to prevent erroring out").
In other words: all BSDs are broken now, no matter which openssl version they have.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi,
Quoted 7 lines · On Wed, 12 Apr 2017 08:24:37 +0200 Gert Doering <[email protected]...> wrote:
While this *looks* harmless, it has non-obvious side effects - from what I observe, it breaks compilation on all platforms that do not have
pkg_configfor OpenSSL, which was not a requirement earlier (and there even was a comment to that extent, "to prevent erroring out").In other words: all BSDs are broken now, no matter which openssl version they have.
This is further complicated by the fact that, beyond OpenSSL 1.0.0, the version number of libssl and libcrypto can no longer be relied upon as an indicator of available features due to the LibreSSL and BoringSSL forks.
For example, OpenBSD does have pkg-config for libssl, but hasn't updated it since LibreSSL was forked:
$ pkg-config --modversion libssl 1.0.0
This causes the latest master branch of OpenVPN to fail to build. It builds and runs fine if I change configure.ac to accept libssl (and libcrypto) 1.0.0.
In the latest LibreSSL portable release on Linux, this would report 2.5.3, but it won't have all the same code as OpenSSL 1.1.0, making version tests useless in the other direction too. I haven't looked at what BoringSSL does.
Hi,
Quoted 5 lines · Steven McDonald
For example, OpenBSD does have pkg-config for libssl, but hasn't updated it since LibreSSL was forked:
$ pkg-config --modversion libssl 1.0.0
I think LibreSSL needs to just die in flames...
Their approach of "we pretend to have OpenSSL's API, but we're not telling you what is really in there, and our version number is meaningless" is just needlessly painful. And we've been hit by this before.
(BoringSSL is not such a big problem since they are changing the API in incompatible ways, so compilation will fail anyway)
But advocacy aside, since the pkg-config stuff isn't going to really help us in deciding "this is good enough for us?", it looks like we need a conftest.c that will just look at the version number #define in <opensslv.h>, and that one can then differenciate against LibreSSL as well ("if it's LibreSSL, 1.0.0 is good enough, if OpenSSL, 1.0.1").
Needless waste of human lifetime, but solvable.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...