1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/openssl/tests/check_default_conf_path.phpt
2021-06-14 14:52:44 +02:00

31 lines
536 B
PHP

--TEST--
Check for default OpenSSL config path on Windows
--EXTENSIONS--
openssl
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip windows only test');
}
?>
--ENV--
OPENSSL_CONF=
--FILE--
<?php
ob_start();
phpinfo();
$info = ob_get_contents();
ob_end_clean();
preg_match(",Openssl default config [^ ]* (.*),", $info, $m);
if (isset($m[1])) {
var_dump(str_replace('/', '\\', strtolower($m[1])));
} else {
echo $info;
}
?>
--EXPECTF--
string(%d) "c:\program files%r( \(x86\)|)%r\common files\ssl\openssl.cnf"