Blame SOURCES/0025-ssl-Allow-to-use-ECDH-ciphers-with-OpenSSL-1.0.patch

fc8cd1
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
fc8cd1
From: Christophe Fergeau <cfergeau@redhat.com>
fc8cd1
Date: Wed, 20 Jun 2018 17:02:14 +0200
fc8cd1
Subject: [spice-server] ssl: Allow to use ECDH ciphers with OpenSSL 1.0
fc8cd1
fc8cd1
Without an explicit call to SSL_CTX_set_ecdh_auto(reds->ctx, 1), OpenSSL
fc8cd1
1.0 (still used by el7) would not use ECDH ciphers (this is now
fc8cd1
automatic with OpenSSL 1.1.0). This commit adds this missing call. It's
fc8cd1
based on a suggestion from David Jasa
fc8cd1
fc8cd1
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
fc8cd1
Acked-by: Frediano Ziglio <fziglio@redhat.com>
fc8cd1
fc8cd1
https://bugzilla.redhat.com/show_bug.cgi?id=1566597
fc8cd1
---
fc8cd1
 server/reds.c | 1 +
fc8cd1
 1 file changed, 1 insertion(+)
fc8cd1
fc8cd1
diff --git a/server/reds.c b/server/reds.c
fc8cd1
index 846e44d..a7b9c38 100644
fc8cd1
--- a/server/reds.c
fc8cd1
+++ b/server/reds.c
fc8cd1
@@ -2955,6 +2955,7 @@ static int reds_init_ssl(RedsState *reds)
fc8cd1
     ssl_options |= SSL_OP_NO_COMPRESSION;
fc8cd1
 #endif
fc8cd1
     SSL_CTX_set_options(reds->ctx, ssl_options);
fc8cd1
+    SSL_CTX_set_ecdh_auto(reds->ctx, 1);
fc8cd1
 
fc8cd1
     /* Load our keys and certificates*/
fc8cd1
     return_code = SSL_CTX_use_certificate_chain_file(reds->ctx, reds->config->ssl_parameters.certs_file);