diff options
author | Lars Strojny <lstrojny@php.net> | 2013-01-31 00:33:46 +0100 |
---|---|---|
committer | Lars Strojny <lstrojny@php.net> | 2013-01-31 00:33:46 +0100 |
commit | 6b48a86a179a741da9f468e3a54994f7ee4ea211 (patch) | |
tree | 08628534a9356c4ef9f3796bbf6f2f9d7c370dfd /ext/openssl | |
parent | 8b972efe5f3e9d4e33d6e0193f3d56716a6cc59f (diff) | |
parent | 836a2b1131dd007edad24d921dbdf42a8ac10e32 (diff) | |
download | php-git-6b48a86a179a741da9f468e3a54994f7ee4ea211.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/xp_ssl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index c6f4e952ac..ff8a22e14f 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -395,6 +395,18 @@ static inline int php_openssl_setup_crypto(php_stream *stream, } #endif +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + { + zval **val; + + if (stream->context && SUCCESS == php_stream_context_get_option( + stream->context, "ssl", "disable_compression", &val) && + zval_is_true(*val)) { + SSL_CTX_set_options(sslsock->ctx, SSL_OP_NO_COMPRESSION); + } + } +#endif + sslsock->ssl_handle = php_SSL_new_from_context(sslsock->ctx, stream TSRMLS_CC); if (sslsock->ssl_handle == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to create an SSL handle"); |