if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+if (false === strpos($link->host_info, 'TCP/IP'))
+ die(sprintf("skip SSL only supported on TCP/IP"));
+
$row = NULL;
if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
$row = $res->fetch_row();
if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+if (false === strpos($link->host_info, 'TCP/IP'))
+ die(sprintf("skip SSL only supported on TCP/IP"));
+
$row = NULL;
if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
$row = $res->fetch_row();
?>
--FILE--
<?php
- include "connect.inc";
+ require_once "connect.inc";
$db1 = new mysqli();
$flags = MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
$link = mysqli_init();
- mysqli_ssl_set($link, null, null, null, null, "RC4-MD5");
+ mysqli_ssl_set($link, null, null, null, null, "AES256-SHA");
if (my_mysqli_real_connect($link, 'p:' . $host, $user, $passwd, $db, $port, null, $flags)) {
$r = $link->query("SHOW STATUS LIKE 'Ssl_cipher'");
var_dump($r->fetch_row());
/* non-persistent connection */
$link2 = mysqli_init();
- mysqli_ssl_set($link2, null, null, null, null, "RC4-MD5");
+ mysqli_ssl_set($link2, null, null, null, null, "AES256-SHA");
if (my_mysqli_real_connect($link2, $host, $user, $passwd, $db, $port, null, $flags)) {
$r2 = $link2->query("SHOW STATUS LIKE 'Ssl_cipher'");
var_dump($r2->fetch_row());
[0]=>
string(10) "Ssl_cipher"
[1]=>
- string(7) "RC4-MD5"
+ string(10) "AES256-SHA"
}
array(2) {
[0]=>
string(10) "Ssl_cipher"
[1]=>
- string(7) "RC4-MD5"
+ string(10) "AES256-SHA"
}
done