diff mbox series

[LEDE-DEV,1/2] ustream-ssl: Enable ECDHE with OpenSSL and prefer it to the other suites.

Message ID 20180330221400.20484-1-rosenp@gmail.com
State Superseded
Headers show
Series [LEDE-DEV,1/2] ustream-ssl: Enable ECDHE with OpenSSL and prefer it to the other suites. | expand

Commit Message

Rosen Penev March 30, 2018, 10:13 p.m. UTC
When used with LuCI, SSLlabs complains that Forward Secrecy is not enabled and thus caps the score to a B.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 ustream-openssl.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/ustream-openssl.c b/ustream-openssl.c
index 83f6140..0f51b9d 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -49,6 +49,10 @@  __ustream_ssl_context_new(bool server)
 		return NULL;
 
 	SSL_CTX_set_verify(c, SSL_VERIFY_NONE, NULL);
+#ifndef OPENSSL_NO_ECDH
+	SSL_CTX_set_ecdh_auto(c, 1);
+#endif
+	SSL_CTX_set_cipher_list(c, "ECDHE:ALL");
 	SSL_CTX_set_quiet_shutdown(c, 1);
 
 	return (void *) c;