Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119209

How to access wss using QWebSocket

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.5.1
    • WebSockets
    • None
    • WebAssembly

    Description

      I use QWebsockets to access SSL's websocket server and prompt for ERR_ CERT_ Authorization_ INVALID error, code as follows:

       QWebSocket * m_webSocket=new QWebSocket("", QWebSocketProtocol::VersionLatest, this);

              m_webSocket->setProxy(QNetworkProxy::NoProxy);
      #ifndef ISEMSCRIPTEN
              QSslConfiguration config;
              config.setPeerVerifyMode(QSslSocket::VerifyNone);
              config.setProtocol(QSsl::TlsV1_2);
              m_webSocket->setSslConfiguration(config);
      #endif
              QUrl newUrl=QUrl{url.toString()+"?token=Bearer "+m_token};
              m_webSocket->open(newUrl);
       
       
      How should I set up SSL in WebAssembly?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            wangzizhang wang zizhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes