Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1501

Secure WebSocket Server (TLS and wss)

$
0
0

I run a static HTTPS page on a webserver providing a valid certificate. On my page, there is a JavaScript creating a websocket connection.

new WebSocket('wss://IpOfWebsocketServer');

The first thing the websocket server receives is a request from the client. But the request itself is encrypted! How should the websocket server read the encrypted request?? When a web client connects to the HTTPS page there is made a TLS handshake and everything later is encrypted - also the request to the websocket server is encrypted. But how should the separately running websocket server know the key to decrypt? Can wss websockets run at all?

Everything (HTML page and websocket server) worked fine earlier when I used HTTP and ws. Now I must switch to HTTPS and wss.


Viewing all articles
Browse latest Browse all 1501

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>