Skip to content

Commit 85a3a4a

Browse files
committed
fix openssl tests?
1 parent 94bece2 commit 85a3a4a

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎ext/openssl/tests/gh19245.phpt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $baseDirPkFile = $baseDir . '/private.key';
1616

1717
$serverCodeTemplate = <<<'CODE'
1818
ini_set('log_errors', 'On');
19-
ini_set('open_basedir', __DIR__ . '/gh19245');
19+
ini_set('open_basedir', '%s');
2020
$serverUri = "ssl://127.0.0.1:0";
2121
$serverFlags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
2222
$serverCtx = stream_context_create(['ssl' => [
@@ -42,7 +42,7 @@ $clientCode = <<<'CODE'
4242
@stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx);
4343
CODE;
4444

45-
$serverCode = sprintf($serverCodeTemplate, $baseDirCertFile . "\0test", $baseDirPkFile);
45+
$serverCode = sprintf($serverCodeTemplate, $baseDir, $baseDirCertFile . "\0test", $baseDirPkFile);
4646
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
4747

4848
?>

‎ext/openssl/tests/gh9310.phpt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,23 +184,23 @@ PHP Warning: stream_socket_accept(): Path for local_pk in ssl stream context op
184184
PHP Warning: stream_socket_accept(): Unable to get real path of private key file `%sprivate.key' in %s
185185
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
186186
PHP Warning: stream_socket_accept(): Accept failed: %s
187-
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310.crt) is not within the allowed path(s): (%sgh9310) in %s
187+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310.crt) is not within the allowed path(s): (%s) in %s
188188
PHP Warning: stream_socket_accept(): Unable to get real path of certificate file `%sgh9310.crt' in %s
189189
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
190190
PHP Warning: stream_socket_accept(): Accept failed: %s
191-
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310.key) is not within the allowed path(s): (%sgh9310) in %s
191+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310.key) is not within the allowed path(s): (%s) in %s
192192
PHP Warning: stream_socket_accept(): Unable to get real path of private key file `%sgh9310.key' in %s
193193
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
194194
PHP Warning: stream_socket_accept(): Accept failed: %s
195-
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310_sni_cs.pem.tmp) is not within the allowed path(s): (%sgh9310) in %s
195+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310_sni_cs.pem.tmp) is not within the allowed path(s): (%s) in %s
196196
PHP Warning: stream_socket_accept(): Failed setting local cert chain file `%sgh9310_sni_cs.pem.tmp'; file not found in %s
197197
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
198198
PHP Warning: stream_socket_accept(): Accept failed: %s
199-
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310_sni_uk_key.pem.tmp) is not within the allowed path(s): (%sgh9310) in %s
199+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310_sni_uk_key.pem.tmp) is not within the allowed path(s): (%s) in %s
200200
PHP Warning: stream_socket_accept(): Failed setting local private key file `%sgh9310_sni_uk_key.pem.tmp'; could not open file in %s
201201
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
202202
PHP Warning: stream_socket_accept(): Accept failed: %s
203-
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310_sni_us_cert.pem.tmp) is not within the allowed path(s): (%sgh9310) in %s
203+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310_sni_us_cert.pem.tmp) is not within the allowed path(s): (%s) in %s
204204
PHP Warning: stream_socket_accept(): Failed setting local cert chain file `%sgh9310_sni_us_cert.pem.tmp'; could not open file in %s
205205
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
206206
PHP Warning: stream_socket_accept(): Accept failed: %s

0 commit comments

Comments
 (0)