Why client in google chrome can not connect to websocket with ssl

499 Views Asked by At

client can't connect to secure websocket with google chrome

error: WebSocket connection to wss://web:port failed

but can connect to secure websocket with firefox.

I'm using reactphp and ratchet libraries

1

There are 1 best solutions below

0
zarok13 On BEST ANSWER

I solved by ignoring peer verification 'verify_peer' => false

$options = ['local_cert' => '...', 'local_pk' => '...', 'verify_peer' => false];
$socket = new SecureServer($socket, $loop, $options);