mysqli_ssl_set.phpt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --TEST--
  2. mysqli_ssl_set() - test is a stub!
  3. --EXTENSIONS--
  4. mysqli
  5. --SKIPIF--
  6. <?php
  7. require_once('skipifconnectfailure.inc');
  8. if (!function_exists('mysqli_ssl_set'))
  9. die("skip function not available");
  10. ?>
  11. --FILE--
  12. <?php
  13. require_once("connect.inc");
  14. /*
  15. This function always returns TRUE value.
  16. $link = mysqli_init();
  17. if (NULL !== ($tmp = @mysqli_ssl_set(
  18. $link,
  19. 'The path name to the key file.',
  20. 'The path name to the certificate file.',
  21. 'The path name to the certificate authority file.',
  22. 'The pathname to a directory that contains trusted SSL CA certificates in PEM format.',
  23. 'A list of allowable ciphers to use for SSL encryption.')))
  24. printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
  25. If SSL setup is incorrect my_mysqli_real_connect()
  26. will return an error when you attempt to connect.
  27. ... and the above SSL setup should be always incorrect.
  28. if (false !== ($tmp = my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
  29. printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
  30. */
  31. print "done!\n";
  32. ?>
  33. --EXPECT--
  34. done!