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_001.phpt ('Basic bitwise stream crypto context 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:
CODE;
16:
17:
$clientCode = <<<'CODE'
18:
    $serverUri = "ssl://127.0.0.1:64321";
19:     $clientFlags = STREAM_CLIENT_CONNECT;
20:     $clientCtx = stream_context_create(['ssl' => [
21:         'verify_peer' => true,
22:         'cafile' => __DIR__ . '/bug54992-ca.pem',
23:         'peer_name' => 'bug54992.local',
24:     ]]);
25:
26:     phpt_wait();
27:
28:     stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
29:     var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
30:
31:     stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
32:     var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
33:
34:     stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLS_CLIENT);
35:     var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
36:
CODE;
37:
38: include 
'ServerClientTestCase.inc';
39:
ServerClientTestCase::getInstance()->run($clientCode$serverCode);
40:

Expected

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)

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
001- resource(%d) of type (stream)
002- resource(%d) of type (stream)
003- resource(%d) of type (stream)
004+ 
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)

 

Generated at Sat, 19 Jul 2014 23:25:50 +0000 (5 days ago)

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