We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6bc266 commit 798e707Copy full SHA for 798e707
ext/openssl/tests/bug76296.phpt
@@ -0,0 +1,22 @@
1
+--TEST--
2
+Bug #76296 openssl_pkey_get_public does not respect open_basedir
3
+--SKIPIF--
4
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
5
+--FILE--
6
+<?php
7
+$dir = __DIR__ . '/bug76296_openbasedir';
8
+$pem = 'file://' . __DIR__ . '/public.key';
9
+if (!is_dir($dir)) {
10
+ mkdir($dir);
11
+}
12
+
13
+ini_set('open_basedir', $dir);
14
15
+var_dump(openssl_pkey_get_public($pem));
16
+?>
17
+--EXPECTF--
18
19
+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
20
+bool(false)
21
+--CLEAN--
22
+@rmdir(__DIR__ . '/bug76296_openbasedir');
0 commit comments