--- src/network/ssl/qsslsocket_openssl.cpp.orig	2015-05-07 10:14:44.000000000 -0400
+++ src/network/ssl/qsslsocket_openssl.cpp	2016-07-20 16:13:13.000000000 -0400
@@ -267,7 +267,13 @@
 #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 = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
+//      SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1|SSL_OP_NO_SSLv2);
+#endif
         break;
     case QSsl::SecureProtocols: // SslV2 will be disabled below
     case QSsl::TlsV1SslV3: // SslV2 will be disabled below
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2015-05-07 10:14:44.000000000 -0400
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp	2016-07-20 16:04:54.000000000 -0400
@@ -225,26 +225,38 @@
 DEFINEFUNC(void, SSL_set_connect_state, SSL *a, a, return, DUMMYARG)
 DEFINEFUNC(int, SSL_shutdown, SSL *a, a, return -1, return)
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
-#ifndef OPENSSL_NO_SSL2
+# ifndef OPENSSL_NO_SSL2
 DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
-#endif
+# endif
+# ifndef OPENSSL_NO_SSL3
 DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+# else
 DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+# endif
 DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
-#ifndef OPENSSL_NO_SSL2
+# ifndef OPENSSL_NO_SSL2
 DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
-#endif
+# endif
+# ifndef OPENSSL_NO_SSL3
 DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+# else
 DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+# endif
 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)
+# else
 DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+# endif
 DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
 DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
+# ifndef OPENSSL_NO_SSL3
 DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+# else
 DEFINEFUNC(SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+# endif
 DEFINEFUNC(SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
 #endif
 DEFINEFUNC3(int, SSL_write, SSL *a, a, const void *b, b, int c, c, return -1, return)
@@ -687,12 +699,18 @@
     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 )
+#else
     RESOLVEFUNC(SSLv23_client_method, 189, libs.first )
+#endif
     RESOLVEFUNC(TLSv1_client_method, 198, libs.first )
     RESOLVEFUNC(SSLv2_server_method, 194, libs.first )
+#ifndef OPENSSL_NO_SSL3
     RESOLVEFUNC(SSLv3_server_method, 197, libs.first )
+#else
     RESOLVEFUNC(SSLv23_server_method, 191, libs.first )
+#endif
     RESOLVEFUNC(TLSv1_server_method, 200, libs.first )
     RESOLVEFUNC(SSL_CTX_load_verify_locations, 34, libs.first )
     RESOLVEFUNC(X509_NAME_entry_count, 1821, libs.second )
@@ -822,14 +840,20 @@
 #ifndef OPENSSL_NO_SSL2
     RESOLVEFUNC(SSLv2_client_method)
 #endif
+#ifndef OPENSSL_NO_SSL3
     RESOLVEFUNC(SSLv3_client_method)
+#else
     RESOLVEFUNC(SSLv23_client_method)
+#endif
     RESOLVEFUNC(TLSv1_client_method)
 #ifndef OPENSSL_NO_SSL2
     RESOLVEFUNC(SSLv2_server_method)
 #endif
+#ifndef OPENSSL_NO_SSL3
     RESOLVEFUNC(SSLv3_server_method)
+#else
     RESOLVEFUNC(SSLv23_server_method)
+#endif
     RESOLVEFUNC(TLSv1_server_method)
     RESOLVEFUNC(X509_NAME_entry_count)
     RESOLVEFUNC(X509_NAME_get_entry)
--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig	2015-05-07 10:14:44.000000000 -0400
+++ src/network/ssl/qsslsocket_openssl_symbols_p.h	2016-07-20 16:05:08.000000000 -0400
@@ -327,21 +327,33 @@
 int q_SSL_shutdown(SSL *a);
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
 const SSL_METHOD *q_SSLv2_client_method();
+#ifndef OPENSSL_NO_SSL3
 const SSL_METHOD *q_SSLv3_client_method();
+#else
 const SSL_METHOD *q_SSLv23_client_method();
+#endif
 const SSL_METHOD *q_TLSv1_client_method();
 const SSL_METHOD *q_SSLv2_server_method();
+#ifndef OPENSSL_NO_SSL3
 const SSL_METHOD *q_SSLv3_server_method();
+#else
 const SSL_METHOD *q_SSLv23_server_method();
+#endif
 const SSL_METHOD *q_TLSv1_server_method();
 #else
 SSL_METHOD *q_SSLv2_client_method();
+#ifndef OPENSSL_NO_SSL3
 SSL_METHOD *q_SSLv3_client_method();
+#else
 SSL_METHOD *q_SSLv23_client_method();
+#endif
 SSL_METHOD *q_TLSv1_client_method();
 SSL_METHOD *q_SSLv2_server_method();
+#ifndef OPENSSL_NO_SSL3
 SSL_METHOD *q_SSLv3_server_method();
+#else
 SSL_METHOD *q_SSLv23_server_method();
+#endif
 SSL_METHOD *q_TLSv1_server_method();
 #endif
 int q_SSL_write(SSL *a, const void *b, int c);
