PHP  
 PHP_5_6
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_002.phpt ('TLSv1.1 and TLSv1.2 bitwise stream crypto flag assignment')

Script

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

Expected

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

Output

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

Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : 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_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 12
bool(false)

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

Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : 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_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 15
bool(false)

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

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

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

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

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

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

Diff

001+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 12
002+ 
003+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 12
004+ 
001- resource(%d) of type (stream)
002- resource(%d) of type (stream)
003- resource(%d) of type (stream)
004- resource(%d) of type (stream)
005+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 12
006+ bool(false)
007+ 
008+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 15
009+ 
010+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : 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_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 15
013+ bool(false)
014+ 
015+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 18
016+ 
017+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 18
018+ 
019+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 18
020+ bool(false)
021+ 
022+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 21
023+ 
024+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 21
025+ 
026+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_5_6/ext/openssl/tests/ServerClientTestCase.inc(92) : eval()'d code on line 21
027+ bool(false)

 

Generated at Thu, 20 Nov 2014 12:38:44 +0000 (6 days ago)

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