Skip to content

Commit c85685a

Browse files
committed
ext/openssl: convert stream E_WARNINGs to new stream error API
1 parent 917f3ea commit c85685a

7 files changed

Lines changed: 144 additions & 126 deletions

File tree

ext/openssl/tests/gh19245.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
4848
?>
4949
--EXPECTF--
5050
PHP Warning: stream_socket_accept(): Path for local_cert in ssl stream context option must not contain any null bytes in %s
51+
PHP Warning: stream_socket_accept(): Accept failed: Cannot enable crypto in %s
5152
PHP Warning: stream_socket_accept(): Unable to get real path of certificate file `%scert.crt' in %s
5253
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
53-
PHP Warning: stream_socket_accept(): Accept failed: Cannot enable crypto in %s

ext/openssl/tests/gh20802.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
5858
?>
5959
--EXPECTF--
6060
%a
61+
PHP Warning: stream_socket_accept(): SNI_server_certs options values must be of type array|string in %s(%d) : eval()'d code on line %d
6162
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s(%d) : eval()'d code on line %d
62-
PHP Warning: stream_socket_accept(): Accept failed: Cannot enable crypto in %s(%d) : eval()'d code on line %d

ext/openssl/tests/gh9310.phpt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -176,31 +176,31 @@ $baseDir = __DIR__ . '/gh9310';
176176
@rmdir($baseDir);
177177
?>
178178
--EXPECTF--
179-
PHP Warning: stream_socket_accept(): Path for local_cert in ssl stream context option must not contain any null bytes in %s
180-
PHP Warning: stream_socket_accept(): Unable to get real path of certificate file `%scert.crt' in %s
181-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
179+
PHP Warning: stream_socket_accept(): Path for local_cert in ssl stream context option must not contain any null bytes in %s : eval()'d code on line %d
182180
PHP Warning: stream_socket_accept(): Accept failed: %s
183-
PHP Warning: stream_socket_accept(): Path for local_pk in ssl stream context option must not contain any null bytes in %s
184-
PHP Warning: stream_socket_accept(): Unable to get real path of private key file `%sprivate.key' in %s
185-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
181+
PHP Warning: stream_socket_accept(): Unable to get real path of certificate file `%scert.crt' in %s : eval()'d code on line %d
182+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d
183+
PHP Warning: stream_socket_accept(): Path for local_pk in ssl stream context option must not contain any null bytes in %s : eval()'d code on line %d
186184
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
188-
PHP Warning: stream_socket_accept(): Unable to get real path of certificate file `%sgh9310.crt' in %s
189-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
185+
PHP Warning: stream_socket_accept(): Unable to get real path of private key file `%sprivate.key' in %s : eval()'d code on line %d
186+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d
187+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310.crt) is not within the allowed path(s): (%sgh9310) in %s : eval()'d code on line %d
190188
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
192-
PHP Warning: stream_socket_accept(): Unable to get real path of private key file `%sgh9310.key' in %s
193-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
189+
PHP Warning: stream_socket_accept(): Unable to get real path of certificate file `%sgh9310.crt' in %s : eval()'d code on line %d
190+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d
191+
PHP Warning: stream_socket_accept(): open_basedir restriction in effect. File(%sgh9310.key) is not within the allowed path(s): (%sgh9310) in %s : eval()'d code on line %d
194192
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
196-
PHP Warning: stream_socket_accept(): Failed setting local cert chain file `%sgh9310_sni_cs.pem.tmp'; file not found in %s
197-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
193+
PHP Warning: stream_socket_accept(): Unable to get real path of private key file `%sgh9310.key' in %s : eval()'d code on line %d
194+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d
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 : eval()'d code on line %d
198196
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
200-
PHP Warning: stream_socket_accept(): Failed setting local private key file `%sgh9310_sni_uk_key.pem.tmp'; could not open file in %s
201-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
197+
PHP Warning: stream_socket_accept(): Failed setting local cert chain file `%sgh9310_sni_cs.pem.tmp'; file not found in %s : eval()'d code on line %d
198+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d
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 : eval()'d code on line %d
202200
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
204-
PHP Warning: stream_socket_accept(): Failed setting local cert chain file `%sgh9310_sni_us_cert.pem.tmp'; could not open file in %s
205-
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s
201+
PHP Warning: stream_socket_accept(): Failed setting local private key file `%sgh9310_sni_uk_key.pem.tmp'; could not open file in %s : eval()'d code on line %d
202+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d
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 : eval()'d code on line %d
206204
PHP Warning: stream_socket_accept(): Accept failed: %s
205+
PHP Warning: stream_socket_accept(): Failed setting local cert chain file `%sgh9310_sni_us_cert.pem.tmp'; could not open file in %s : eval()'d code on line %d
206+
PHP Warning: stream_socket_accept(): Failed to enable crypto in %s : eval()'d code on line %d

0 commit comments

Comments
 (0)