]> granicus.if.org Git - php/commitdiff
Disable TLS compression by default in both clients and servers
authorDaniel Lowrey <rdlowrey@php.net>
Tue, 11 Feb 2014 13:27:32 +0000 (06:27 -0700)
committerDaniel Lowrey <rdlowrey@php.net>
Fri, 21 Feb 2014 00:10:06 +0000 (17:10 -0700)
ext/openssl/xp_ssl.c

index 4dda5a4c72b895b7a832be1790f4b220582177eb..99995b6814cb72b7eb08c71fba7b0ee71955068c 100644 (file)
@@ -418,9 +418,9 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
        {
                zval **val;
 
-               if (stream->context && SUCCESS == php_stream_context_get_option(
-                                       stream->context, "ssl", "disable_compression", &val) &&
-                               zend_is_true(*val)
+               if (stream->context && (FAILURE == php_stream_context_get_option(
+                                       stream->context, "ssl", "disable_compression", &val) ||
+                               zend_is_true(*val))
                ) {
                        SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_COMPRESSION);
                }