Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSslSocket and openssl
Forum Updated to NodeBB v4.3 + New Features

QSslSocket and openssl

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 4 Posters 5.7k 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.
  • m.sueM Offline
    m.sueM Offline
    m.sue
    wrote on last edited by
    #2

    Hi,

    the openssl files are not part of Qt, so there is nothing to replace. You willl have to provide them yourself right from the beginning. Please cmp. here what to do: http://doc.qt.io/qt-5/opensslsupport.html

    -Michael.

    J.HilkJ 1 Reply Last reply
    0
    • m.sueM m.sue

      Hi,

      the openssl files are not part of Qt, so there is nothing to replace. You willl have to provide them yourself right from the beginning. Please cmp. here what to do: http://doc.qt.io/qt-5/opensslsupport.html

      -Michael.

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by
      #3

      Hi, thanks for the answer,

      @m.sue said in QSslSocket and openssl:

      Hi,

      the openssl files are not part of Qt, so there is nothing to replace. You willl have to provide them yourself right from the beginning. Please cmp. here what to do: http://doc.qt.io/qt-5/opensslsupport.html

      -Michael.

      I actually read through that doc-party multiple times and more or less dismissed it as only needed when building on/for Android.

      As for openssl not part of Qt, thats not really true, I believe, because

      • QSslSocket::supportsSsl()
      • QSslSocket::sslLibraryVersionNumber()
      • QSslSocket::sslLibraryVersionString()
      • QSslSocket::sslLibraryBuildVersionNumber()
      • QSslSocket::sslLibraryBuildVersionString();

      all result in non empty strings:

      • true
      • 268435743
      • "OpenSSL 1.0.0q 15 Jan 2015"
      • 268443791
      • "OpenSSL 1.0.2h 3 May 2016"

      And I don't have to do any linking at all when using MacOS.

      Also adding:

      • LIBS += -LC:/OpenSSL-Win32/lib/MinGW -llibssl-1_1
        and
      • LIBS += -LC:/OpenSSL-Win32/lib/MinGW -llibcrypto-1_1

      has no effect either.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • m.sueM Offline
        m.sueM Offline
        m.sue
        wrote on last edited by m.sue
        #4

        Hi,

        on the MAC OpenSSL may be part of MAC OS. It may also be part of MinGW. But it is not part of Qt, i.e. deployed with the Qt sources.

        If the Qt configure finds it in the OS it may use it automatically, though. So you can probably replace it there, where Qt finds it and then just re-configure..

        -Michael.

        J.HilkJ 1 Reply Last reply
        0
        • m.sueM m.sue

          Hi,

          on the MAC OpenSSL may be part of MAC OS. It may also be part of MinGW. But it is not part of Qt, i.e. deployed with the Qt sources.

          If the Qt configure finds it in the OS it may use it automatically, though. So you can probably replace it there, where Qt finds it and then just re-configure..

          -Michael.

          J.HilkJ Online
          J.HilkJ Online
          J.Hilk
          Moderators
          wrote on last edited by
          #5

          @m.sue Apple like most of the time does it own thing, and does not use openssl at all but Common Crypto

          Anyway,
          under ..\Windows\SysWOW64 I do find, libssl-1_1.dll und libcrypto-1_1.dll, created in Febuary. There is no other, older libssl in the windows folder.

          February is one month before I installed Qt on this Pc.
          However, I did not build Qt from source but used the precompiled version instead.

          If you suggest recompiling Qt from source with the correct openssl linked. I would rather not do that if possible.
          Of course if thats is the only way, than I will do it, but there ought to be an other way to link the correct libary!?


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #6

            openssl library is not part of Qt distribution. You need to provide the directory where it is present.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

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

              Hi,

              You currently need to use a version of OpenSSL that is lower than 1.1. The folks from OpenSSL broke compatibility with the 1.1 release.

              There's a new backend in the work for OpenSSL version starting at 1.1.

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

              J.HilkJ 1 Reply Last reply
              1
              • SGaistS SGaist

                Hi,

                You currently need to use a version of OpenSSL that is lower than 1.1. The folks from OpenSSL broke compatibility with the 1.1 release.

                There's a new backend in the work for OpenSSL version starting at 1.1.

                J.HilkJ Online
                J.HilkJ Online
                J.Hilk
                Moderators
                wrote on last edited by
                #8

                Thanks for the reminder!
                @SGaist said in QSslSocket and openssl:

                Hi,

                You currently need to use a version of OpenSSL that is lower than 1.1. The folks from OpenSSL broke compatibility with the 1.1 release.

                There's a new backend in the work for OpenSSL version starting at 1.1.

                I installed 1.0.2 of openssl

                I'm an idiot, because I read this thread 10 days ago and did not remember it, when I run into the same issues.

                Sadly this does not fix all my problems, all the openssl warnings are gone at least ! But apparently the certificates can not be found:

                SslErrors ("The issuer certificate of a locally looked up certificate could not be found", "No certificates could be verified")
                

                I guess I have to set them manually ?


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

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

                  You have a completely private custom certificate ?

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

                  J.HilkJ 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    You have a completely private custom certificate ?

                    J.HilkJ Online
                    J.HilkJ Online
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #10

                    @SGaist Didn't know it before, but it turns out I most likly do have one here at work, trying to get a hold of my system admin to talk about it.

                    socket->peerCertificateChain() Shows one certificate with my companies name in it.

                    If I want to test my program internally, than I need to add that certificate for that phase. Later on when the software is out of house, it should be fine with the default certificates.


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    0
                    • J.HilkJ Online
                      J.HilkJ Online
                      J.Hilk
                      Moderators
                      wrote on last edited by
                      #11

                      Ok, to make this a finishing answer:

                      One needs an openssl version lower than 1.1, because OpenSSL broke compatibility with the 1.1 release - thanks @SGaist for that info.

                      So one has to download a previous version from the OpenSSL webside, here or get a precompiled version, Wiki+binaries

                      Than place/install the dll's in your system path, or at the same folder as your app-executable. Qt will find the correct libaries and you will see the errors/warnings disapear.

                      If you want to export your program/app one can't expect openssl to be installed on the target platform, so you will have to place the correct dll's in the same folder as your executable.


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

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

                        When developing, never put anything in your system path, you might create borders effect hard to debug in other projects.

                        As for deployment on Windows, you should always provide all the dependencies your application need with the exception of system level dependencies i.e. the stuff already provided by Windows itself.

                        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

                        • Login

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