From cb3730b0cf07fd5f247b5e89d650b75491996756 Mon Sep 17 00:00:00 2001 From: Daniel Lowrey Date: Fri, 11 Oct 2013 15:54:13 -0400 Subject: [PATCH 1/2] honor_server_ciphers ssl context option --- ext/openssl/openssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 952bd75927ff..282887a7011d 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -5159,8 +5159,12 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ cipherlist = "DEFAULT"; } if (SSL_CTX_set_cipher_list(ctx, cipherlist) != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set cipher list `%s'", cipherlist); return NULL; } + if (GET_VER_OPT("honor_server_ciphers")) { + SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); + } GET_VER_OPT_STRING("local_cert", certfile); if (certfile) { From c8068c7e673343fc963c5101235810115c68a4c6 Mon Sep 17 00:00:00 2001 From: Daniel Lowrey Date: Mon, 14 Oct 2013 09:32:00 -0400 Subject: [PATCH 2/2] Changed context option to 'honor_cipher_order' --- ext/openssl/openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 282887a7011d..ef7de3b51eeb 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -5162,7 +5162,7 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set cipher list `%s'", cipherlist); return NULL; } - if (GET_VER_OPT("honor_server_ciphers")) { + if (GET_VER_OPT("honor_cipher_order")) { SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); }