summaryrefslogtreecommitdiff
path: root/src/tls.c
diff options
context:
space:
mode:
authorYossi Gottlieb <yossigo@gmail.com>2020-04-20 13:34:37 +0300
committerYossi Gottlieb <yossigo@gmail.com>2020-04-20 13:34:37 +0300
commitc8a720d17dd81ccbcb513c59806c788479f8bb4a (patch)
treea96d56b069f54ee336e2353944f78080f1b75d50 /src/tls.c
parent85d1d1f8700a050ef3178a2d5f5757f9aa77476b (diff)
downloadredis-c8a720d17dd81ccbcb513c59806c788479f8bb4a.tar.gz
TLS: Fix build on older verisons of OpenSSL.
Diffstat (limited to 'src/tls.c')
-rw-r--r--src/tls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tls.c b/src/tls.c
index 5fac6902b..ea0c34469 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -168,7 +168,9 @@ int tlsConfigure(redisTLSContextConfig *ctx_config) {
SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE|SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL);
+#if defined(SSL_CTX_set_ecdh_auto)
SSL_CTX_set_ecdh_auto(ctx, 1);
+#endif
if (SSL_CTX_use_certificate_file(ctx, ctx_config->cert_file, SSL_FILETYPE_PEM) <= 0) {
ERR_error_string_n(ERR_get_error(), errbuf, sizeof(errbuf));