1--TEST-- 2mysqli_ssl_set() - test is a stub! 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifemb.inc'); 7require_once('skipifconnectfailure.inc'); 8if (!function_exists('mysqli_ssl_set')) 9 die("skip function not available"); 10?> 11--FILE-- 12<?php 13 require_once("connect.inc"); 14 15 $tmp = NULL; 16 $link = NULL; 17 18 if (!is_null($tmp = @mysqli_ssl_set())) 19 printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 20 21 if (!is_null($tmp = @mysqli_ssl_set($link))) 22 printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 23 24 if (!is_null($tmp = @mysqli_ssl_set($link, $link))) 25 printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 26 27 if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link))) 28 printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 29 30 if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link))) 31 printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 32 33 if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link, $link))) 34 printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 35 36 /* 37 This function always returns TRUE value. 38 39 $link = mysqli_init(); 40 if (NULL !== ($tmp = @mysqli_ssl_set( 41 $link, 42 'The path name to the key file.', 43 'The path name to the certificate file.', 44 'The path name to the certificate authority file.', 45 'The pathname to a directory that contains trusted SSL CA certificates in PEM format.', 46 'A list of allowable ciphers to use for SSL encryption.'))) 47 printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); 48 49 50 If SSL setup is incorrect my_mysqli_real_connect() 51 will return an error when you attempt to connect. 52 53 ... and the above SSL setup should be always incorrect. 54 55 if (false !== ($tmp = my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))) 56 printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); 57 */ 58 print "done!\n"; 59?> 60--EXPECTF-- 61done! 62