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 WebSocket client ignoreSslErrors
Forum Updated to NodeBB v4.3 + New Features

WebAssembly WebSocket client ignoreSslErrors

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
2 Posts 2 Posters 651 Views 2 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 last edited by nsourl
    #1

    Hi,

    How it could be possible in Qt for WebAssembly to call the ignoreSslErrors function on my secure WebSocket (wss) client in order to overcome the self-signed certificate error?

    Thanks.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Karmo
      wrote on last edited by Karmo
      #2

      I researched the same thing and concluded it can't be done. The Qt WebSocket in WASM is a thin wrapper over the browser websocket support - same thing that can be used in Javascript. And that does not support ignoring SSL errors, see https://security.stackexchange.com/questions/211618/bypassing-valid-certificate-requirement-for-websockets/211636#211636.

      Only thing that does work, is to gain access to wss://IP:PORT, first open https://IP:PORT/index.html in your browser and manually make the user click "Proceed to IP (unsafe). After that you can open a websocket to same IP:PORT.

      aaafdb05-cd7e-47d4-ad64-8bfd47e6f721-image.png

      This is for me enough to test my app. In production should use a valid certificate.

      Another option for testing might be to use the qtwasmserver described in https://doc.qt.io/qt-6/wasm.html#running-applications but I personally have not tried it.

      1 Reply Last reply
      0

      • Login

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