|
@@ -0,0 +1,51 @@
|
|
1
|
+From eee374c28ea8ea22834ff14515b5584bc3e0c7b5 Mon Sep 17 00:00:00 2001
|
|
2
|
+From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= <jca@wxcvbn.org>
|
|
3
|
+Date: Sat, 25 Jul 2015 16:50:52 -0600
|
|
4
|
+Subject: [PATCH 3/4] BUILD: ssl: Allow building against libssl without SSLv3.
|
|
5
|
+
|
|
6
|
+If SSLv3 is explicitely requested but not available, warn the user and
|
|
7
|
+bail out.
|
|
8
|
+(cherry picked from commit 17c3f6284cf605e47f6525c077bc644c45272849)
|
|
9
|
+---
|
|
10
|
+ src/ssl_sock.c | 16 ++++++++++++++--
|
|
11
|
+ 1 file changed, 14 insertions(+), 2 deletions(-)
|
|
12
|
+
|
|
13
|
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
|
|
14
|
+index 7d77d36..2ae45ec 100644
|
|
15
|
+--- a/src/ssl_sock.c
|
|
16
|
++++ b/src/ssl_sock.c
|
|
17
|
+@@ -1405,8 +1405,14 @@ int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, SSL_CTX *ctx, struct proxy
|
|
18
|
+ ssloptions |= SSL_OP_NO_TLSv1_2;
|
|
19
|
+ if (bind_conf->ssl_options & BC_SSL_O_NO_TLS_TICKETS)
|
|
20
|
+ ssloptions |= SSL_OP_NO_TICKET;
|
|
21
|
+- if (bind_conf->ssl_options & BC_SSL_O_USE_SSLV3)
|
|
22
|
++ if (bind_conf->ssl_options & BC_SSL_O_USE_SSLV3) {
|
|
23
|
++#ifndef OPENSSL_NO_SSL3
|
|
24
|
+ SSL_CTX_set_ssl_version(ctx, SSLv3_server_method());
|
|
25
|
++#else
|
|
26
|
++ Alert("SSLv3 support requested but unavailable.\n");
|
|
27
|
++ cfgerr++;
|
|
28
|
++#endif
|
|
29
|
++ }
|
|
30
|
+ if (bind_conf->ssl_options & BC_SSL_O_USE_TLSV10)
|
|
31
|
+ SSL_CTX_set_ssl_version(ctx, TLSv1_server_method());
|
|
32
|
+ #if SSL_OP_NO_TLSv1_1
|
|
33
|
+@@ -1750,8 +1756,14 @@ int ssl_sock_prepare_srv_ctx(struct server *srv, struct proxy *curproxy)
|
|
34
|
+ options |= SSL_OP_NO_TLSv1_2;
|
|
35
|
+ if (srv->ssl_ctx.options & SRV_SSL_O_NO_TLS_TICKETS)
|
|
36
|
+ options |= SSL_OP_NO_TICKET;
|
|
37
|
+- if (srv->ssl_ctx.options & SRV_SSL_O_USE_SSLV3)
|
|
38
|
++ if (srv->ssl_ctx.options & SRV_SSL_O_USE_SSLV3) {
|
|
39
|
++#ifndef OPENSSL_NO_SSL3
|
|
40
|
+ SSL_CTX_set_ssl_version(srv->ssl_ctx.ctx, SSLv3_client_method());
|
|
41
|
++#else
|
|
42
|
++ Alert("SSLv3 support requested but unavailable.");
|
|
43
|
++ cfgerr++;
|
|
44
|
++#endif
|
|
45
|
++ }
|
|
46
|
+ if (srv->ssl_ctx.options & SRV_SSL_O_USE_TLSV10)
|
|
47
|
+ SSL_CTX_set_ssl_version(srv->ssl_ctx.ctx, TLSv1_client_method());
|
|
48
|
+ #if SSL_OP_NO_TLSv1_1
|
|
49
|
+--
|
|
50
|
+2.3.6
|
|
51
|
+
|