--TEST-- Bug #76705: unusable ssl => peer_fingerprint in stream_context_create() --SKIPIF-- --FILE-- [ 'local_cert' => __DIR__ . '/bug76705.pem' ]]); $server = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx); phpt_notify(); @stream_socket_accept($server, 1); CODE; $clientCode = <<<'CODE' $serverUri = "ssl://127.0.0.1:64323"; $clientFlags = STREAM_CLIENT_CONNECT; $clientCtx = stream_context_create(['ssl' => [ 'verify_peer' => true, 'peer_name' => 'openssl.php.net', 'allow_self_signed' => true, 'peer_fingerprint' => [ 'sha256' => '4A524F3617E41BCCA1370ED9E89C9A7A83C28F0F342C490296D362869BDF1DA8', ] ]]); phpt_wait(); var_dump(stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx)); CODE; include 'ServerClientTestCase.inc'; ServerClientTestCase::getInstance()->run($clientCode, $serverCode); ?> --EXPECTF-- resource(%d) of type (stream)