Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL websockets #34

Closed
chromer opened this issue Mar 21, 2012 · 2 comments
Closed

SSL websockets #34

chromer opened this issue Mar 21, 2012 · 2 comments
Labels

Comments

@chromer
Copy link

chromer commented Mar 21, 2012

I was trying to make websockify with SSL to work on firefox it works when I allow insecre ws in config but I was thinking if i' ll implement wss protocol it ll allow it by default. Can you please tell me how to start a wss websocify server i.e what args to pass into init(cert, key etc) cause i tried it and it was not working.

@chromer
Copy link
Author

chromer commented Mar 21, 2012

I tried using a self signed cert self.pem but i get:
1: handler exception: [Errno 1] _ssl.c:1331: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
I used this command to generate certificate:
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem (as mentioned in noVNC documentation)
what shd I do about it in Firefox this works in chrome.
I am using FF 11.0 Chrome 17.0.963.79 m on Windows XP. I am running the server on a debian box.
Please tell me the correct way to do this.
Here is the chrome output(it works in chrome):
SSL/TLS (wss://) WebSocket connection
Version hybi-13, base64: 'True'
Path: '/websockify'

@kanaka
Copy link
Member

kanaka commented Mar 21, 2012

Since it's self-signed you need to get firefox to accept the certificate. Unfortunately, unlike normal HTTPS, WebSockets connections don't give you the opportunity to accept self-signed certs so you have to use another mechanism. You can either import the cert directly, or browse to the Websocket port directly using https and accept it that way. I describe this a bit more in the Troubleshooting wiki page.

Chrome automatically accepts certificates for WebSocket whether they are valid or not. Neither behavior is particularly ideal. I tried to push firefox to allow WebSocket certs to be manually accepted. Perhaps if you file a bug and we get multiple voices calling for it they might do it.

@kanaka kanaka closed this as completed Mar 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants