From: Andrey Hristov Date: Mon, 16 Nov 2015 11:38:25 +0000 (+0100) Subject: News for fixed bug #68344 X-Git-Tag: php-5.6.17RC1~27^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=822400ef3b807f0a73b4c0879cdf4a802bf7e4fe;p=php News for fixed bug #68344 --- diff --git a/NEWS b/NEWS index cb0b72fbe2..72cd4f9ed0 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,11 @@ PHP NEWS . Fixed bug #70748 (Segfault in ini_lex () at Zend/zend_ini_scanner.l). (Laruence) +- Mysqlnd: + . Fixed bug #68344 (MySQLi does not provide way to disable peer certificate + validation) by introducing MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT + connection flag. (Andrey) + - OCI8: . Fixed bug #68298 (OCI int overflow) (Senthil). diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 3e8d0993fa..2231e1db2c 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -965,6 +965,10 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC) ZVAL_BOOL(&verify_peer_zval, verify); php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval); php_stream_context_set_option(context, "ssl", "verify_peer_name", &verify_peer_zval); + if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) { + ZVAL_TRUE(&verify_peer_zval); + php_stream_context_set_option(context, "ssl", "allow_self_signed", &verify_peer_zval); + } } php_stream_context_set(net_stream, context);