Skip to content

Commit 96406f0

Browse files
committed
Merge branch 'PHP-5.6' into PHP-7.0
2 parents 9134f9e + 822400e commit 96406f0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ PHP NEWS
4343
. Fixed bug #70323 (Regression in zend_fetch_debug_backtrace() can cause
4444
segfaults). (Aharvey, Laruence)
4545

46+
- Mysqlnd:
47+
. Fixed bug #68344 (MySQLi does not provide way to disable peer certificate
48+
validation) by introducing MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
49+
connection flag. (Andrey)
50+
4651
- OCI8:
4752
. Fixed bug #68298 (OCI int overflow) (Senthil).
4853

ext/mysqlnd/mysqlnd_net.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,10 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net)
978978
ZVAL_BOOL(&verify_peer_zval, verify);
979979
php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval);
980980
php_stream_context_set_option(context, "ssl", "verify_peer_name", &verify_peer_zval);
981+
if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) {
982+
ZVAL_TRUE(&verify_peer_zval);
983+
php_stream_context_set_option(context, "ssl", "allow_self_signed", &verify_peer_zval);
984+
}
981985
}
982986
#if PHP_API_VERSION >= 20131106
983987
php_stream_context_set(net_stream, context);

0 commit comments

Comments
 (0)