File qsslsocket-QTBUG-14985.patch of Package libqt4

--- src/network/ssl/qsslsocket_openssl.cpp.orig
+++ src/network/ssl/qsslsocket_openssl.cpp
@@ -278,7 +278,13 @@ init_context:
 
     // Enable all bug workarounds.
     q_SSL_CTX_set_options(ctx, SSL_OP_ALL);
-
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+    // Tell OpenSSL to release memory early
+    // http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
+    // FIXME also do runtime SSL version checking or make Qt require 1.0.0
+    // http://www.openssl.org/docs/crypto/OPENSSL_VERSION_NUMBER.html
+    q_SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
     // Initialize ciphers
     QByteArray cipherString;
     int first = true;
--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig
+++ src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -389,6 +389,7 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsign
 			bp,(char *)x,enc,kstr,klen,cb,u)
 #endif
 #define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
+#define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
 #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
 #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
 #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
openSUSE Build Service is sponsored by