I would like to connect server A and server B using TLS v1.2,
but I got an error “Unable to enable crypto on TCP connection”.
It is implemented as follows,
When I looked at the packet with tcpdump, and found that server A and server B failed to connect with SSLv3 instead of TLS v1.2.
Could you tell me how to solve this problem?
Zend Framework 3
PHP 7.3
apache2.4
$config = array(
'adapter' => Zend\Http\Client\Adapter\Socket::class,
'ssltransport' => 'tlsv1.2',
'sslverifypeer' => false,
'timeout' => 3
);
$options = array(
'ssl' => array(
'allow_self_signed' => TRUE,
'capture_peer_cert' => FALSE,
'cafile' =>xxx.crt'
)
);
$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;
$adapter = new Zend\Http\Client\Adapter\Socket();
$context = stream_context_create($options);
$adapter->setStreamContext($context);
$client = new Zend\Http\Client();
$client->setAdapter($adapter);
$client->setOptions($config);
$client->setUri($urls['xxx']);
$client->setMethod(Zend\Http\Request::METHOD_POST);
$client->setRawBody($wsdl);
$client->setEncType('text/xml');
$response = $client->send();
Thanks for your insights.