skamazin
skamazin

Reputation: 757

Creating a Secure Websocket (wss) Server in Java

My main objective is to maintain TLS on a secure website. I'm currently running ws on an https site, the "SSL Lock" in Chrome is appearing red/broken because I am using a non-authenticated source from an https website. I need to secure the WebSocket so that the SSL Lock is preserved.

I've been searching the web for an example of how to implement wss in Java (server) and JavaScript (client), but I can't seem to find anything that I can use. I've seen a few examples of how create an SSL Server (I do have the necessary certificates for a TLS/SSL connection), but I'm not sure how to translate this to wss.

If anyone could provide an example on how to use wss from Java, I would greatly appreciate it.

Upvotes: 0

Views: 5069

Answers (1)

stdunbar
stdunbar

Reputation: 17535

A secure websocket can use a standard SSL certificate for a web server. You could do this in, for example, Tomcat or use Apache with mod_proxy_wstunnel between the browser and you Java server.

Upvotes: 1

Related Questions