File disable-ssl-compression-by-default.diff of Package libqt4.openSUSE_Evergreen_11.4

commit 3488f1db96dbf70bb0486d3013d86252ebf433e0
Author: Richard Moore <rich@kde.org>
Date:   Tue Sep 18 22:06:15 2012 +0100

    Disable SSL compression by default.
    
    Disable SSL compression by default since this appears to be the a likely
    cause of the currently hyped CRIME attack.
    
    This is a backport of 5ea896fbc63593f424a7dfbb11387599c0025c74
    from qt5.
    
    Change-Id: I8fd01c2a230804d88ffa4599e7fd9293a8af9e0f
    Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
    Reviewed-by: Shane Kearns <shane.kearns@accenture.com>

--- a/src/network/ssl/qsslsocket_openssl.cpp.orig	2012-12-30 23:50:00.672179311 +0100
+++ b/src/network/ssl/qsslsocket_openssl.cpp	2012-12-30 23:50:43.101126188 +0100
@@ -279,7 +279,13 @@
     }
 
     // Enable all bug workarounds.
+#ifdef SSL_OP_NO_COMPRESSION
+    // If compression is available, then disable it to avoid the CRIME attack
+    // if it is not available then we're not vulnerable anyway.
+    q_SSL_CTX_set_options(ctx, SSL_OP_ALL|SSL_OP_NO_COMPRESSION);
+#else
     q_SSL_CTX_set_options(ctx, SSL_OP_ALL);
+#endif
 
     // Initialize ciphers
     QByteArray cipherString;
openSUSE Build Service is sponsored by