Skip to content

Commit 9badf35

Browse files
keluniksgolemon
authored andcommitted
Default single_dh_use and honor_cipher_order to true
1 parent c690916 commit 9badf35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/openssl/xp_ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,12 +1252,12 @@ static int set_server_specific_opts(php_stream *stream, SSL_CTX *ctx) /* {{{ */
12521252

12531253
set_server_dh_param(stream, ctx);
12541254
zv = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "single_dh_use");
1255-
if (zv != NULL && zend_is_true(zv)) {
1255+
if (zv == NULL || zend_is_true(zv)) {
12561256
ssl_ctx_options |= SSL_OP_SINGLE_DH_USE;
12571257
}
12581258

12591259
zv = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "honor_cipher_order");
1260-
if (zv != NULL && zend_is_true(zv)) {
1260+
if (zv == NULL || zend_is_true(zv)) {
12611261
ssl_ctx_options |= SSL_OP_CIPHER_SERVER_PREFERENCE;
12621262
}
12631263

0 commit comments

Comments
 (0)