sitegui / nodejs-websocket

A node.js module for websocket server and client
MIT License
736 stars 155 forks source link

Unable to create an https server ... #36

Closed nkolban closed 8 years ago

nkolban commented 8 years ago

When I add the "secure": true option to the createServer call in order to create an HTTPs based server and then send in a wss request, I get the error logged:

WebSocket connection to 'wss://localhost:3000/' failed: Error in connection establishment: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

When I try and hit localhost:3000 using a browser, I get the same error. I am using the latest version of Chrome.

sitegui commented 8 years ago

Hi @nkolban ,

That's weird, since this lib does no funny business with the TLS layer at all. It simply forwards the options object to node's tls.createServer: https://github.com/sitegui/nodejs-websocket/blob/master/Server.js#L52

I think that's most probably an issue with your node version, options object or certificate.

See this example of a WSS server and node docs on tls.createServer