Closed
Description
Trying to access TLS servers, I keep getting errors. For example when trying to access https://www.google.com , I get this:
An error occurred in the underlying stream:
Unable to complete SSL/TLS handshake:
stream_socket_enable_crypto():
Peer certificate CN=`www.google.com' did not match expected CN=`74.125.140.106'
My code is:
$request = $this->client->request('GET', 'https://www.google.com', [ ]);
$request->on('error', function ($err) use ($callback) { $callback($err, NULL); });
$request->on('response', function ($response) {
$response->on('data', function ($data, $response) {
echo "Got response data";
var_dump([$data, $response]);
});
});
$request->end();
Metadata
Metadata
Assignees
Labels
No labels