Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. TLS initialization failed only on a particular machine
Forum Update on Monday, May 27th 2025

TLS initialization failed only on a particular machine

Scheduled Pinned Locked Moved Solved 3rd Party Software
12 Posts 5 Posters 2.4k 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.
  • F Offline
    F Offline
    fsinisi
    wrote on last edited by
    #1

    Hi guys!

    I have this very strange situation. I have a Qt application that connects to a web server and I'm receiving the "TLS initialization failed" error but only in a particular machine (HP Z800 workstation with Windows 10 Pro latest version).

    My application uses Qt 5.15.0 and I've included the OpenSSL 1.1.1 compiled libraries that come with Qt (C:\Qt\Qt5.15.0\Tools\OpenSSL\Win_x64\bin, in particular, the files libcrypto-1_1-x64.dll and libssl-1_1-x64.dll).

    The weird thing is that it is failing only for this particular machine. Other machines in the same network are working just fine. The application has been distributed for months to a wide variety of users and this is the first time I have this problem. Could it be a bug of OpenSSL for that particular hardware configuration? How could I test that? Or what else could be happening?

    I've already tried disabling the antivirus, the firewall, running as admin, running in compatibility mode - nothing worked. I'm running out of ideas so any help would be really appreciated!

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

      Hi,

      Just a wild idea, did you check the certificates installed on that machine ?

      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
      • F Offline
        F Offline
        fsinisi
        wrote on last edited by
        #3

        Hi SGaist! Thanks for your answer. I will check. What should I be looking for?

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

          I'd start with checking If there's a certificate that is outdated or missing.

          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
          • H Offline
            H Offline
            Harry Schneider
            wrote on last edited by
            #5

            Having the same issue. Certificates seems to be valid (clean Win 10 Pro). Any other ideas ?

            Pablo J. RoginaP 1 Reply Last reply
            0
            • H Harry Schneider

              Having the same issue. Certificates seems to be valid (clean Win 10 Pro). Any other ideas ?

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

              @Harry-Schneider said in TLS initialization failed only on a particular machine:

              Any other ideas ?

              You may want to use Wireshark to check the TLS handshake.

              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

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

                @Harry-Schneider said in TLS initialization failed only on a particular machine:

                Any other ideas ?

                You may want to use Wireshark to check the TLS handshake.

                F Offline
                F Offline
                fsinisi
                wrote on last edited by
                #7

                @Pablo-J-Rogina said in TLS initialization failed only on a particular machine:

                @Harry-Schneider said in TLS initialization failed only on a particular machine:

                Any other ideas ?

                You may want to use Wireshark to check the TLS handshake.

                Hi Pablo, thanks for the suggestion. I'm using WireShark to compare the packages between a request that is working and the one is failing, but I don't see any differences at first sight. Do you know if there's anything in particular that I could look for?

                Here's the successful request:

                success.png

                And the one is failing:

                fail.png

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  fsinisi
                  wrote on last edited by
                  #8

                  @SGaist @Pablo-J-Rogina Do you know if there's a way to log more information about the error? Because I don't see anything wrong when I analyze the packages with WireShark. Right now I'm using poReply->errorString().

                  Does it make sense to try updating Qt 6.0? Do you know if the binaries for libcrypto and/or libssl have been updated since Qt 5.15.0? Any other ideas?

                  Thanks!

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

                    You test different versions of OpenSSL yourself. They are not linked just dynamically loaded and even if linked, you can switch them.

                    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
                    1
                    • F Offline
                      F Offline
                      fsinisi
                      wrote on last edited by
                      #10

                      It worked by updating the OpenSSL binaries to OpenSSL 1.1.1j. So it's probably a bug that was solved in that version. Many thanks for the help! Hope this helps someone.

                      artwawA 1 Reply Last reply
                      1
                      • F fsinisi

                        It worked by updating the OpenSSL binaries to OpenSSL 1.1.1j. So it's probably a bug that was solved in that version. Many thanks for the help! Hope this helps someone.

                        artwawA Offline
                        artwawA Offline
                        artwaw
                        wrote on last edited by
                        #11

                        @fsinisi I had similar problem in the past and I found out that binaries for OpenSSL distributed with Qt are compiled used MSVC, they require additional libraries from MS. Some of the computers that were running my software had them, some of them not.
                        Problem was solved by using OpenSSL build with MinGW - no dependencies there.

                        For more information please re-read.

                        Kind Regards,
                        Artur

                        1 Reply Last reply
                        1
                        • F Offline
                          F Offline
                          fsinisi
                          wrote on last edited by
                          #12

                          @artwaw Thanks for the tip!

                          In this particular case, I think the problem was related to the version because it started to work after updating to OpenSSL 1.1.1j instead of the version that comes with Qt 5.15.0 (which I think is OpenSSL 1.1.1g but I'm not sure now).

                          I compiled the libraries myself following the official guide which uses MSVC: https://github.com/openssl/openssl/blob/master/NOTES-WINDOWS.md

                          Anyway, your suggestion makes sense and it is definitely something to try as well if anyone has problems.

                          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