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

[REG 6.1.0 -> 6.2] No TLS backend available in statically built project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.2.0
    • 6.2.0
    • Build System: CMake
    • None
    • Ubuntu 20.04 LTS
      cmake 3.19.2 from Qt online installer
      g++ 9.3.0
      clang 10.0.0
    • c9a96928307c1f6012d731e3a47979ca73203fe8 (qt/qtbase/dev)

    Description

      1. Have a statically linked Qt.
        I configured and built it with:
        /tmp/cmake-network/qt5/configure -static -release -prefix $PWD/qtbase -opensource -confirm-license -nomake tests -nomake examples && cmake --build . --parallel
        
      2. Use this to build the attached cmake project:
        /tmp/cmake-network/static/qtbase/bin/qt-cmake /tmp/report/ && cmake --build .
        
      3. Run the resulting binary passing the attached certificate file:
        ./pem /tmp/report/qt-io.pem
        

        You will get output like:

        qt.network.ssl: No functional TLS backend was found
        qt.network.ssl: No functional TLS backend was found
        qt.network.ssl: No TLS backend is available
        qt.network.ssl: No functional TLS backend was found
        isNull(): true
        expiryDate(): QDateTime(Invalid)
        

      Doing exactly the same with a non-static build of Qt will result in the output:

      isNull(): false
      expiryDate(): QDateTime(2021-09-29 12:00:00.000 UTC Qt::UTC)
      

      I expect the same output from a static build.

      Should my CMakeLists.txt contain a mistake which causes this, please let me know.

      Attachments

        1. CMakeLists.txt
          0.3 kB
        2. main.cpp
          2 kB
        3. pem.pro
          0.1 kB
        4. qt-io.pem
          2 kB

        Issue Links

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

          Activity

            People

              kkohne Kai Köhne
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes