com php-src: News for fixed bug #68344: NEWS ext/mysqlnd/mysqln d_net.c

From: Date: Mon, 16 Nov 2015 11:38:25 +0000
Subject: com php-src: News for fixed bug #68344: NEWS ext/mysqlnd/mysqln d_net.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89870@lists.php.net to get a copy of this message
Commit: 822400ef3b807f0a73b4c0879cdf4a802bf7e4fe Author: Andrey Hristov <andrey@php.net> Mon, 16 Nov 2015 12:38:25 +0100 Parents: 25439e939e8d6a86bcc1654221460851b43271d5 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=822400ef3b807f0a73b4c0879cdf4a802bf7e4fe Log: News for fixed bug #68344 Bugs: https://bugs.php.net/68344 Changed paths: M NEWS M ext/mysqlnd/mysqlnd_net.c Diff: diff --git a/NEWS b/NEWS index cb0b72f..72cd4f9 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 3e8d099..2231e1d 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);

« previous php.cvs (#89870) next »