mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08:00
Remove SSLv3 test dependencies
SSLv3 is going away. Debian8 already ships with an openssl with no SSLv3 support which was causing these tests to fail.
This commit is contained in:
parent
151b4ea3cd
commit
32484e3f5f
@ -35,11 +35,6 @@ $clientCode = <<<'CODE'
|
||||
|
||||
phpt_wait();
|
||||
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
|
||||
@stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx);
|
||||
$meta = stream_context_get_options($clientCtx)['ssl']['session_meta'];
|
||||
var_dump($meta['protocol']);
|
||||
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
|
||||
@stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx);
|
||||
$meta = stream_context_get_options($clientCtx)['ssl']['session_meta'];
|
||||
@ -59,7 +54,6 @@ CODE;
|
||||
include 'ServerClientTestCase.inc';
|
||||
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
|
||||
--EXPECTF--
|
||||
string(5) "SSLv3"
|
||||
string(5) "TLSv1"
|
||||
string(7) "TLSv1.1"
|
||||
string(7) "TLSv1.2"
|
||||
|
@ -32,9 +32,6 @@ $clientCode = <<<'CODE'
|
||||
|
||||
phpt_wait();
|
||||
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
|
||||
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
|
||||
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
|
||||
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
|
||||
|
||||
@ -47,4 +44,3 @@ ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
|
||||
--EXPECTF--
|
||||
resource(%d) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
|
@ -13,7 +13,7 @@ $serverCode = <<<'CODE'
|
||||
$serverCtx = stream_context_create(['ssl' => [
|
||||
'local_cert' => __DIR__ . '/bug54992.pem',
|
||||
|
||||
// Only accept SSLv3 and TLSv1.2 connections
|
||||
// Only accept TLSv1.2 connections
|
||||
'crypto_method' => STREAM_CRYPTO_METHOD_SSLv3_SERVER | STREAM_CRYPTO_METHOD_TLSv1_2_SERVER,
|
||||
]]);
|
||||
|
||||
@ -40,9 +40,6 @@ $clientCode = <<<'CODE'
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT);
|
||||
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
|
||||
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_SSLv3_CLIENT);
|
||||
var_dump(stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
|
||||
|
||||
stream_context_set_option($clientCtx, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT);
|
||||
var_dump(@stream_socket_client($serverUri, $errno, $errstr, 1, $clientFlags, $clientCtx));
|
||||
|
||||
@ -54,7 +51,6 @@ include 'ServerClientTestCase.inc';
|
||||
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
|
||||
--EXPECTF--
|
||||
resource(%d) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
|
@ -4,6 +4,7 @@ Specific crypto method for ssl:// transports.
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
if (!function_exists("proc_open")) die("skip no proc_open");
|
||||
if (OPENSSL_VERSION_NUMBER < 0x10001001) die("skip OpenSSLv1.0.1 required");
|
||||
--FILE--
|
||||
<?php
|
||||
$serverCode = <<<'CODE'
|
||||
@ -37,7 +38,7 @@ $clientCode = <<<'CODE'
|
||||
$serverUri = "https://127.0.0.1:64321/";
|
||||
$clientFlags = STREAM_CLIENT_CONNECT;
|
||||
$clientCtx = stream_context_create(['ssl' => [
|
||||
'crypto_method' => STREAM_CRYPTO_METHOD_SSLv3_CLIENT,
|
||||
'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false
|
||||
]]);
|
||||
|
Loading…
Reference in New Issue
Block a user