WebAssembly Secure Websockets
-
wrote on 4 Mar 2022, 14:41 last edited by nsourl 3 Apr 2022, 14:45
Hi,
I am trying to run some of the Qt Websocket Examples (sslechoserver, sslechoclient and etc) on Qt 5.15 WebAssembly. The insecure websocket works fine but until now I wasn't able to run normally a secure websocket (wss) example because I am having some errors on the browser side.
Is there any limitation on secure websockets (wss) on Qt WebAssembly that I am not aware of?
Thanks.
-
wrote on 8 Mar 2022, 13:59 last edited by
Any idea on this from anyone please?
-
wrote on 22 Mar 2022, 12:22 last edited by
Haven't tested that particular example but secured websockets do work me in Qt 5.15.2 WASM. Although to establish a connection, you will need either:
- use a valid certificate (not some self-signed stuff).
- make your browser accept the certificate. So when testing wss://127.0.0.1:7689 in my app, I have to once navigate with my browser to https://127.0.0.1:7689/index.html and manually click to accept the certificate.
-
Haven't tested that particular example but secured websockets do work me in Qt 5.15.2 WASM. Although to establish a connection, you will need either:
- use a valid certificate (not some self-signed stuff).
- make your browser accept the certificate. So when testing wss://127.0.0.1:7689 in my app, I have to once navigate with my browser to https://127.0.0.1:7689/index.html and manually click to accept the certificate.
wrote on 22 Mar 2022, 15:07 last edited byHi @Karmo ,
thanks for your reply and it's good to know that in general secured WebSockets work fine in Qt 5.15.2 Wasm because I had some doubts about that since no one mentioned anything related.
So, I will keep in mind your remarks with the certificates and try to run a simple example from scratch to validate secured WebSockets functionality in Wasm and then scale it up.
Appreciate your valuable feedback!
-
wrote on 8 Apr 2022, 06:49 last edited by
Browsers are particular about webassembly and a secure context. Most will allow connection to 127.0.0.1.
I am not sure there is any way to specify using any particular certificate though.