com php-src: Add 'honor_cipher_order' server contex t option: ext/openssl/xp_ssl.c

From: Date: Fri, 21 Feb 2014 00:10:06 +0000
Subject: com php-src: Add 'honor_cipher_order' server contex t option: ext/openssl/xp_ssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76154@lists.php.net to get a copy of this message
Commit: 742fc5fb3562eff6f0ac5f53ec2b4d2c11ebfabf Author: Daniel Lowrey <rdlowrey@php.net> Wed, 19 Feb 2014 20:39:57 -0700 Parents: 081c8e9d92b27eddbb3600c59f8d58d7afa4b229 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=742fc5fb3562eff6f0ac5f53ec2b4d2c11ebfabf Log: Add 'honor_cipher_order' server context option Changed paths: M ext/openssl/xp_ssl.c Diff: diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index aa1d50e..ea2e5f7 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -435,6 +435,13 @@ static inline int php_openssl_setup_crypto(php_stream *stream, return -1; } + if (!sslsock->is_client && stream->context && SUCCESS == php_stream_context_get_option( + stream->context, "ssl", "honor_cipher_order", &val) && + zend_is_true(*val) + ) { + SSL_CTX_set_options(sslsock->ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); + } + #ifdef SSL_MODE_RELEASE_BUFFERS long mode = SSL_get_mode(sslsock->ssl_handle); SSL_set_mode(sslsock->ssl_handle, mode | SSL_MODE_RELEASE_BUFFERS);

« previous php.cvs (#76154) next »