Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. configure custom CA Certs?

configure custom CA Certs?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
6 Posts 3 Posters 1.7k 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.
  • P Offline
    P Offline
    poncho524
    wrote on last edited by
    #1

    How can you configure WebEngine to use custom CA certs?

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      https://doc.qt.io/qt-5.15/qtwebengine-overview.html#managing-certificates suggests using the certificateError signals. If this functions like QSslSocket or QNetworkReply, telling the stack to ignore the error results in the certificate being accepted.

      The other option is to change "the root CA certificates from the operating system". How that is performed is likely OS specific and may require elevated permission.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      Pablo J. RoginaP 1 Reply Last reply
      0
      • jeremy_kJ jeremy_k

        https://doc.qt.io/qt-5.15/qtwebengine-overview.html#managing-certificates suggests using the certificateError signals. If this functions like QSslSocket or QNetworkReply, telling the stack to ignore the error results in the certificate being accepted.

        The other option is to change "the root CA certificates from the operating system". How that is performed is likely OS specific and may require elevated permission.

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @jeremy_k said in configure custom CA Certs?:

        telling the stack to ignore the error results in the certificate being accepted

        please don't do that! you may end up accepting any certificate...

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        jeremy_kJ 1 Reply Last reply
        0
        • Pablo J. RoginaP Pablo J. Rogina

          @jeremy_k said in configure custom CA Certs?:

          telling the stack to ignore the error results in the certificate being accepted

          please don't do that! you may end up accepting any certificate...

          jeremy_kJ Offline
          jeremy_kJ Offline
          jeremy_k
          wrote on last edited by
          #4

          @Pablo-J-Rogina said in configure custom CA Certs?:

          @jeremy_k said in configure custom CA Certs?:

          telling the stack to ignore the error results in the certificate being accepted

          please don't do that! you may end up accepting any certificate...

          That's the point. Ignore the error for certificates that you wish to accept.

          For example, QWebEnginePage::certificateError receives a QWebEngineCertificateError object. Call QWebEngineCertificateError::certificateChain() to get a QList<QSslCertificate>. Examine each one, and defer, ignore, or reject the chain.

          Asking a question about code? http://eel.is/iso-c++/testcase/

          P 1 Reply Last reply
          0
          • jeremy_kJ jeremy_k

            @Pablo-J-Rogina said in configure custom CA Certs?:

            @jeremy_k said in configure custom CA Certs?:

            telling the stack to ignore the error results in the certificate being accepted

            please don't do that! you may end up accepting any certificate...

            That's the point. Ignore the error for certificates that you wish to accept.

            For example, QWebEnginePage::certificateError receives a QWebEngineCertificateError object. Call QWebEngineCertificateError::certificateChain() to get a QList<QSslCertificate>. Examine each one, and defer, ignore, or reject the chain.

            P Offline
            P Offline
            poncho524
            wrote on last edited by
            #5

            @jeremy_k
            Interesting. So this is only possible with webengineview. Im currently using webview. Is there any down side to switching to webengineview?

            jeremy_kJ 1 Reply Last reply
            0
            • P poncho524

              @jeremy_k
              Interesting. So this is only possible with webengineview. Im currently using webview. Is there any down side to switching to webengineview?

              jeremy_kJ Offline
              jeremy_kJ Offline
              jeremy_k
              wrote on last edited by
              #6

              @poncho524 I don't know, for both the question of possibility, and any issues for switching. The documentation mentions OS-specific WebEngine differences, including some cases where WebView uses WebEngine.

              Asking a question about code? http://eel.is/iso-c++/testcase/

              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