Skip to content

Commit 822400e

Browse files
committed
News for fixed bug #68344
1 parent 25439e9 commit 822400e

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
@@ -17,6 +17,11 @@ PHP NEWS
1717
. Fixed bug #70748 (Segfault in ini_lex () at Zend/zend_ini_scanner.l).
1818
(Laruence)
1919

20+
- Mysqlnd:
21+
. Fixed bug #68344 (MySQLi does not provide way to disable peer certificate
22+
validation) by introducing MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
23+
connection flag. (Andrey)
24+
2025
- OCI8:
2126
. Fixed bug #68298 (OCI int overflow) (Senthil).
2227

ext/mysqlnd/mysqlnd_net.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,10 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC)
965965
ZVAL_BOOL(&verify_peer_zval, verify);
966966
php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval);
967967
php_stream_context_set_option(context, "ssl", "verify_peer_name", &verify_peer_zval);
968+
if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) {
969+
ZVAL_TRUE(&verify_peer_zval);
970+
php_stream_context_set_option(context, "ssl", "allow_self_signed", &verify_peer_zval);
971+
}
968972
}
969973

970974
php_stream_context_set(net_stream, context);

0 commit comments

Comments
 (0)