Websocket: Improve WSS ssl handling