From: Daniel Lowrey Date: Tue, 11 Feb 2014 13:27:32 +0000 (-0700) Subject: Disable TLS compression by default in both clients and servers X-Git-Tag: php-5.6.0alpha3~1^2~43^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b98b093d73e935f4ab4d30423b652ed38a4c6d68;p=php Disable TLS compression by default in both clients and servers --- diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 4dda5a4c72..99995b6814 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -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); }