Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Qt4.6.3 on eLinux and SSL support
Forum Update on Monday, May 27th 2025

Qt4.6.3 on eLinux and SSL support

Scheduled Pinned Locked Moved Qt WebKit
15 Posts 3 Posters 5.2k Views
  • 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.
  • T Offline
    T Offline
    ThatDude
    wrote on last edited by
    #6

    Now I see you posted error messages...

    I guess your embedded Linux box probably doesn't have general certificate store - If that is the case you'll have to add/import full cert. chain

    see the python solution here

    http://tiku.io/questions/1782171/qt-ssl-error-on-hotmail-com-the-issuer-certificate-of-a-locally-looked-up-certi

    it might help to force using SSLv3 for failing pages too

    If you have ROOT CA authority on your embedded system then you can check the answer here
    http://stackoverflow.com/questions/3683826/qnetworkrequest-and-default-ssl-configuration
    sometimes something as simple as this helps
    setSslConfiguration(QSslConfiguration::defaultConfiguration());
    or if you don't have root CA well then you have to add certs one by one

    1 Reply Last reply
    0
    • McLionM Offline
      McLionM Offline
      McLion
      wrote on last edited by
      #7

      Thanks a lot. I'll read through your suggestions and post back the results.

      1 Reply Last reply
      0
      • McLionM Offline
        McLionM Offline
        McLion
        wrote on last edited by
        #8

        You're right. I'm missing certs in my eLinux.

        Tried to adding certs and I stumbled over this:
        @QSslSocket::addDefaultCaCertificates("/opt/cert/testcert.pem")@
        works and the page loads perfectly.

        When I try to do soemthing like this to have it load all certs that I place into a folder:
        @QSslSocket::addDefaultCaCertificates("/opt/cert/.", QSsl::Pem, QRegExp::Wildcard)@
        it does not load any and returns an error.

        What is wrong with my command?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #9

          Hi,

          Maybe a silly question but are you sure you only have pem files in that folder ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • McLionM Offline
            McLionM Offline
            McLion
            wrote on last edited by
            #10

            There is currently only the one testcert.pem in this folder and no other files.

            1 Reply Last reply
            0
            • McLionM Offline
              McLionM Offline
              McLion
              wrote on last edited by
              #11

              No success, tried any option possible. Though it's documented it seems not to work for multiple files in a folder. I goggled this and could not find anybody that succeeded in trying this. This would be very useful because certs to be used could be changed by a mapped folder without any need for a change of the software.

              I found a pem cert-bundle created from the Mozzilla bundle certdata.txt and I think I will use this. If I get that correct this will give me most of the rootCA in one file, which should do it. If I need another cert added I will need to modify the pem bundle, which I have no clue on how to do that as of now.

              The other way would have been more straight-forward.
              Thanks anyway

              1 Reply Last reply
              0
              • McLionM Offline
                McLionM Offline
                McLion
                wrote on last edited by
                #12

                Additional question:
                In my SSL error handler I had
                reply->ignoreSslErrors();
                for debugging purpose.
                If I don't want to ignore anymore, do I need to return something else with reply?

                1 Reply Last reply
                0
                • McLionM Offline
                  McLionM Offline
                  McLion
                  wrote on last edited by
                  #13

                  Nobody ever used SSL and did not simply ignore all errors ?!?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #14

                    Which version of OpenSSL are you using ?

                    As for modifying the bundle, IIRC you can add your information at the bottom of it

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • McLionM Offline
                      McLionM Offline
                      McLion
                      wrote on last edited by
                      #15

                      I am currently using openSSL 1.0.1c. I know, thats rather old and I'm thinking of updating it.
                      The CA-bundle I use is based on Mozilla's certdata.txt from Dec. 2014, converted to PEM format and it has all the root CA certificates I currently need. You're right, new certificates can simply be added or old ones replaced in the CA-bundle in PEM format.
                      As for the SslErrorHandler in Qt: What do I use to replace reply->ignoreSslErrors() in my handler to satisfy the reply for SSL? I could not find any documentation on that.

                      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