1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Files
archived-php-src/ext/openssl/tests/check_default_conf_path.phpt
T
Christoph M. Becker d15e10d7ab Fix test wrt. OPENSSL_CONF
This test is supposed to verify the path of the default OpenSSL config
file; it will fail, though, if OPENSSL_CONF is explicitly set, so we
explicitly unset this environment variable for this test.
2021-06-13 16:53:45 +02:00

29 lines
513 B
PHP

--TEST--
Check for default OpenSSL config path on Windows
--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"