Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. WebAssembly Secure Websockets
Forum Updated to NodeBB v4.3 + New Features

WebAssembly Secure Websockets

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
5 Posts 3 Posters 1.1k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nsourl
    wrote on 4 Mar 2022, 14:41 last edited by nsourl 3 Apr 2022, 14:45
    #1

    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.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nsourl
      wrote on 8 Mar 2022, 13:59 last edited by
      #2

      Any idea on this from anyone please?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Karmo
        wrote on 22 Mar 2022, 12:22 last edited by
        #3

        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.
        N 1 Reply Last reply 22 Mar 2022, 15:07
        1
        • K Karmo
          22 Mar 2022, 12:22

          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.
          N Offline
          N Offline
          nsourl
          wrote on 22 Mar 2022, 15:07 last edited by
          #4

          Hi @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!

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lorn.potter
            wrote on 8 Apr 2022, 06:49 last edited by
            #5

            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.

            Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
            Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved