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

Test Failure Report for ext/openssl/tests/bug69215.phpt ('Bug #69215: Crypto servers should send client CA list')

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__ . '/bug69215-server.pem',
7:         'passphrase' => 'elephpant',
8:         'cafile' => __DIR__ . '/bug69215-ca.pem',
9:         'verify_peer' => true,
10:         'verify_peer_name' => true,
11:         'peer_name' => 'bug69215-client',
12:     ]]);
13:
14:     $server = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
15:     phpt_notify();
16:
17:     stream_socket_accept($server, 30);
18:
CODE;
19:
20:
$clientCode = <<<'CODE'
21:
    $serverUri = "ssl://127.0.0.1:64321";
22:     $clientFlags = STREAM_CLIENT_CONNECT;
23:     $clientCtx = stream_context_create(['ssl' => [
24:         'local_cert' => __DIR__ . '/bug69215-client.pem',
25:         'passphrase' => 'elephpant',
26:         'cafile' => __DIR__ . '/bug69215-ca.pem',
27:         'verify_peer' => true,
28:         'verify_peer_name' => true,
29:         'peer_name' => 'bug69215-server',
30:     ]]);
31:
32:     phpt_wait();
33:
34:     var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
35:
CODE;
36:
37: include 
'ServerClientTestCase.inc';
38:
ServerClientTestCase::getInstance()->run($clientCode$serverCode);
39:

Expected

resource(%d) of type (stream)

Output

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

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

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

Diff

001+ Warning: stream_socket_client(): SSL: Handshake timed out in /var/php_gcov/PHP_7_1/ext/openssl/tests/ServerClientTestCase.inc(96) : eval()'d code on line 14
001- resource(%d) of type (stream)
002+ 
003+ Warning: stream_socket_client(): Failed to enable crypto in /var/php_gcov/PHP_7_1/ext/openssl/tests/ServerClientTestCase.inc(96) : eval()'d code on line 14
004+ 
005+ Warning: stream_socket_client(): unable to connect to ssl://127.0.0.1:64321 (Unknown error) in /var/php_gcov/PHP_7_1/ext/openssl/tests/ServerClientTestCase.inc(96) : eval()'d code on line 14
006+ bool(false)

 

Generated at Fri, 17 Nov 2017 10:18:10 +0000 (2 days ago)

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