|
|
b07f02 |
From d83c0edf4c6ae42359ff856d7a879ecba5769595 Mon Sep 17 00:00:00 2001
|
|
|
b07f02 |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
b07f02 |
Date: Fri, 17 Feb 2017 16:51:41 +0100
|
|
|
b07f02 |
Subject: [PATCH 1/2] fix compatibility with OpenSSL 1.1
|
|
|
b07f02 |
|
|
|
b07f02 |
---
|
|
|
b07f02 |
src/network/ssl/socket.c | 4 ++--
|
|
|
b07f02 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
b07f02 |
|
|
|
b07f02 |
diff --git a/src/network/ssl/socket.c b/src/network/ssl/socket.c
|
|
|
b07f02 |
index c9e2be4..467fc48 100644
|
|
|
b07f02 |
--- a/src/network/ssl/socket.c
|
|
|
b07f02 |
+++ b/src/network/ssl/socket.c
|
|
|
b07f02 |
@@ -83,7 +83,7 @@ static void
|
|
|
b07f02 |
ssl_set_no_tls(struct socket *socket)
|
|
|
b07f02 |
{
|
|
|
b07f02 |
#ifdef CONFIG_OPENSSL
|
|
|
b07f02 |
- ((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1;
|
|
|
b07f02 |
+ SSL_set_options((ssl_t *) socket->ssl, SSL_OP_NO_TLSv1);
|
|
|
b07f02 |
#elif defined(CONFIG_GNUTLS)
|
|
|
b07f02 |
{
|
|
|
b07f02 |
/* GnuTLS does not support SSLv2 because it is "insecure".
|
|
|
b07f02 |
@@ -419,7 +419,7 @@ ssl_connect(struct socket *socket)
|
|
|
b07f02 |
}
|
|
|
b07f02 |
|
|
|
b07f02 |
if (client_cert) {
|
|
|
b07f02 |
- SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx;
|
|
|
b07f02 |
+ SSL_CTX *ctx = SSL_get_SSL_CTX((SSL *) socket->ssl);
|
|
|
b07f02 |
|
|
|
b07f02 |
SSL_CTX_use_certificate_chain_file(ctx, client_cert);
|
|
|
b07f02 |
SSL_CTX_use_PrivateKey_file(ctx, client_cert,
|
|
|
b07f02 |
--
|
|
|
b07f02 |
2.7.4
|
|
|
b07f02 |
|
|
|
b07f02 |
|
|
|
b07f02 |
From ec952cc5b79973bee73fcfc813159d40c22b7228 Mon Sep 17 00:00:00 2001
|
|
|
b07f02 |
From: Tomas Mraz <tmraz@fedoraproject.org>
|
|
|
b07f02 |
Date: Fri, 17 Feb 2017 16:44:11 +0100
|
|
|
b07f02 |
Subject: [PATCH 2/2] drop disablement of TLS1.0 on second attempt to connect
|
|
|
b07f02 |
|
|
|
b07f02 |
It would not work correctly anyway and the code does not build
|
|
|
b07f02 |
with OpenSSL-1.1.0.
|
|
|
b07f02 |
---
|
|
|
b07f02 |
src/network/ssl/socket.c | 6 ++++++
|
|
|
b07f02 |
1 file changed, 6 insertions(+)
|
|
|
b07f02 |
|
|
|
b07f02 |
diff --git a/src/network/ssl/socket.c b/src/network/ssl/socket.c
|
|
|
b07f02 |
index 467fc48..b981c1e 100644
|
|
|
b07f02 |
--- a/src/network/ssl/socket.c
|
|
|
b07f02 |
+++ b/src/network/ssl/socket.c
|
|
|
b07f02 |
@@ -82,6 +82,11 @@
|
|
|
b07f02 |
static void
|
|
|
b07f02 |
ssl_set_no_tls(struct socket *socket)
|
|
|
b07f02 |
{
|
|
|
b07f02 |
+#if 0
|
|
|
b07f02 |
+/* This implements the insecure renegotiation, which should not be used.
|
|
|
b07f02 |
+ * The code also would not work on current Fedora (>= Fedora 23) anyway,
|
|
|
b07f02 |
+ * because it would just switch off TLS 1.0 keeping TLS 1.1 and 1.2 enabled.
|
|
|
b07f02 |
+ */
|
|
|
b07f02 |
#ifdef CONFIG_OPENSSL
|
|
|
b07f02 |
SSL_set_options((ssl_t *) socket->ssl, SSL_OP_NO_TLSv1);
|
|
|
b07f02 |
#elif defined(CONFIG_GNUTLS)
|
|
|
b07f02 |
@@ -96,6 +101,7 @@ ssl_set_no_tls(struct socket *socket)
|
|
|
b07f02 |
gnutls_protocol_set_priority(*(ssl_t *) socket->ssl, protocol_priority);
|
|
|
b07f02 |
}
|
|
|
b07f02 |
#endif
|
|
|
b07f02 |
+#endif
|
|
|
b07f02 |
}
|
|
|
b07f02 |
|
|
|
b07f02 |
#ifdef USE_OPENSSL
|
|
|
b07f02 |
--
|
|
|
b07f02 |
2.7.4
|
|
|
b07f02 |
|