PHP  
 PHP_7_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/openssl/tests/stream_crypto_flags_001.phpt ('Basic bitwise stream crypto context flag assignment')

Script

1: <?php
2: $certFile 
__DIR__ DIRECTORY_SEPARATOR 'stream_crypto_flags_001.pem.tmp';
3:
$cacertFile __DIR__ DIRECTORY_SEPARATOR 'stream_crypto_flags_001-ca.pem.tmp';
4:
5:
$serverCode = <<<'CODE'
6:
    $serverUri = "ssl://127.0.0.1:64321";
7:     $serverFlags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
8:     $serverCtx = stream_context_create(['ssl' => [
9:         'local_cert' => '%s'
10:     ]]);
11:
12:     $server = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
13:     phpt_notify();
14:
15:     @stream_socket_accept($server, 1);
16:     @stream_socket_accept($server, 1);
17:     @stream_socket_accept($server, 1);
18:
CODE;
19:
$serverCode sprintf($serverCode$certFile);
20:
21:
$peerName 'stream_crypto_flags_001';
22:
$clientCode = <<<'CODE'
23:
    $serverUri = "ssl://127.0.0.1:64321";
24:     $clientFlags = STREAM_CLIENT_CONNECT;
25:     $clientCtx = stream_context_create(['ssl' => [
26:         'verify_peer' => true,
27:         'cafile' => '%s',
28:         'peer_name' => '%s',
29:     ]]);
30:
31:     phpt_wait();
32:
33:     stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
34:     var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
35:
36:     stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLS_CLIENT);
37:     var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
38:
CODE;
39:
$clientCode sprintf($clientCode$cacertFile$peerName);
40:
41: include 
'CertificateGenerator.inc';
42:
$certificateGenerator = new CertificateGenerator();
43:
$certificateGenerator->saveCaCert($cacertFile);
44:
$certificateGenerator->saveNewCertAsFileWithKey($peerName$certFile);
45:
46: include 
'ServerClientTestCase.inc';
47:
ServerClientTestCase::getInstance()->run($clientCode$serverCode);
48:
?>
49:

Expected

resource(%d) of type (stream)
resource(%d) of type (stream)

Output

Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 12

Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 12

Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 12
bool(false)

Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 15

Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 15

Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 15
bool(false)

Diff

001+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 12
002+ 
001- resource(%d) of type (stream)
002- resource(%d) of type (stream)
003+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 12
004+ 
005+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 12
006+ bool(false)
007+ 
008+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 15
009+ 
010+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 15
011+ 
012+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_7_3/ext/openssl/tests/ServerClientTestCase.inc(130) : eval()'d code on line 15
013+ bool(false)

 

Generated at Thu, 14 Nov 2019 02:24:20 +0000 (11 hours ago)

Copyright © 2005-2019 The PHP Group
All rights reserved.