phpwebsocketratchetreactphp

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


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


Solution

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

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