]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: Be sure that SSLv3 connection methods exist for openssl < 1.1.0
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 8 Jun 2017 20:18:52 +0000 (22:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 14 Jun 2017 14:40:38 +0000 (16:40 +0200)
For openssl 1.0.2, SSLv3_server_method and SSLv3_client_method are undefined if
OPENSSL_NO_SSL3_METHOD is set. So we must add a check on this macro before using
these functions.

src/ssl_sock.c

index af09cfba2fcaa4c73d42ca8bd225128e8ffd6b05..368051506852e07b89b094f63d608be83cd8bd59 100644 (file)
@@ -1835,7 +1835,7 @@ typedef enum { SET_CLIENT, SET_SERVER } set_context_func;
 
 static void ctx_set_SSLv3_func(SSL_CTX *ctx, set_context_func c)
 {
-#if SSL_OP_NO_SSLv3
+#if SSL_OP_NO_SSLv3 && !defined(OPENSSL_NO_SSL3_METHOD)
        c == SET_SERVER ? SSL_CTX_set_ssl_version(ctx, SSLv3_server_method())
                : SSL_CTX_set_ssl_version(ctx, SSLv3_client_method());
 #endif