1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/openssl/tests/bug76296.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

24 lines
539 B
PHP

--TEST--
Bug #76296 openssl_pkey_get_public does not respect open_basedir
--EXTENSIONS--
openssl
--FILE--
<?php
$dir = __DIR__ . '/bug76296_openbasedir';
$pem = 'file://' . __DIR__ . '/public.key';
if (!is_dir($dir)) {
mkdir($dir);
}
ini_set('open_basedir', $dir);
var_dump(openssl_pkey_get_public($pem));
?>
--CLEAN--
<?php
@rmdir(__DIR__ . '/bug76296_openbasedir');
?>
--EXPECTF--
Warning: openssl_pkey_get_public(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d
bool(false)