PHP  
 PHP_HEAD
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_verify_peer_name_002.phpt ('Allow host name mismatch when "verify_host" disabled')

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:
CODE;
14:
15:
$clientCode = <<<'CODE'
16:
    $serverUri = "ssl://127.0.0.1:64321";
17:     $clientFlags = STREAM_CLIENT_CONNECT;
18:     $clientCtx = stream_context_create(['ssl' => [
19:         'verify_peer' => true,
20:         'cafile' => __DIR__ . '/bug54992-ca.pem',
21:         'verify_peer_name' => false
22:     ]]);
23:
24:     phpt_wait();
25:     $client = stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx);
26:
27:     var_dump($client);
28:
CODE;
29:
30: include 
'ServerClientTestCase.inc';
31:
ServerClientTestCase::getInstance()->run($clientCode$serverCode);
32:

Expected

resource(%d) of type (stream)

Output

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

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

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

Diff

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

 

Generated at Wed, 22 Oct 2014 07:25:05 +0000 (2 days ago)

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