summaryrefslogtreecommitdiff
path: root/libraries/qt4/patches/qt-4.8-disable-sslv3.patch
blob: c9b1996ec4640125b3809e8f224ae9379600415b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- ./src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2019-11-09 12:55:26.646752874 -0600
+++ ./src/network/ssl/qsslsocket_openssl_symbols.cpp	2019-11-09 12:58:22.032754751 -0600
@@ -253,7 +253,9 @@
 #ifndef OPENSSL_NO_SSL2
 DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
 #endif
+#ifndef OPENSSL_NO_SSL3
 DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
 DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
 #else
@@ -263,7 +265,9 @@
 #ifndef OPENSSL_NO_SSL2
 DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
 #endif
+#ifndef OPENSSL_NO_SSL3
 DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
 DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
 #else
@@ -272,7 +276,9 @@
 DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
 #else
 DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#ifndef OPENSSL_NO_SSL3
 DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
 DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
 DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
 DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
@@ -756,7 +762,9 @@
     RESOLVEFUNC(SSL_shutdown, 173, libs.first )
     RESOLVEFUNC(SSL_write, 188, libs.first )
     RESOLVEFUNC(SSLv2_client_method, 192, libs.first )
+#ifndef OPENSSL_NO_SSL3
     RESOLVEFUNC(SSLv3_client_method, 195, libs.first )
+#endif
     RESOLVEFUNC(SSLv23_client_method, 189, libs.first )
     RESOLVEFUNC(TLSv1_client_method, 198, libs.first )
     RESOLVEFUNC(SSLv2_server_method, 194, libs.first )
--- ./src/network/ssl/qsslsocket_openssl.cpp.orig	2019-11-09 12:55:01.605752606 -0600
+++ ./src/network/ssl/qsslsocket_openssl.cpp	2019-11-09 12:55:26.632752874 -0600
@@ -273,7 +273,11 @@
 #endif
         break;
     case QSsl::SslV3:
+#ifndef OPENSSL_NO_SSL3
         ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
+#else
+        ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
+#endif
         break;
     case QSsl::SecureProtocols: // SslV2 will be disabled below
     case QSsl::TlsV1SslV3: // SslV2 will be disabled below