Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QSslSocket::startClientEncryption: TLS initialization failed
QtWS25 Last Chance

QSslSocket::startClientEncryption: TLS initialization failed

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 2 Posters 422 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.
  • K Offline
    K Offline
    KidBuu
    wrote on last edited by
    #1

    I've made a deployable application that uses OpenSSL. I installed the OpenSSL 1.1.1j Toolkit using QT's Maintenance Tool, and copied the "libcrypto-1_1-x64.dll" and "libssl-1_1-x64.dll" into the win64 directory of the deployed application.

    It works perfectly fine on my computer and several other computers that I've tested with. However, I decided to test it on a freshly made Windows 10 x64 Virtual Machine. When starting the application and connecting I get the following errors:

    QSslSocket::startClientEncryption: TLS initialization failed
    QAbstractSocket::SocketError(20)
    

    Qt Version: 5.15.0
    OpenSSL Version: 1.1.1

    Does anyone know what's going on? The application is quite large, if sample code is needed I'll have to make a smaller sample project...

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, just a guess but maybe you've forgotten to install (or copy) the Microsoft C/C++ runtime .dlls (like vcruntime140.dll etc) they are needed by the OpenSSL .dlls I believe.

      K 1 Reply Last reply
      2
      • K Offline
        K Offline
        KidBuu
        wrote on last edited by
        #3

        The deployed version has an installer that includes the required c++ redistributable. So it was installed also, and upon searching for that specific file it was found in C:\Windows\system32.

        1 Reply Last reply
        0
        • hskoglundH hskoglund

          Hi, just a guess but maybe you've forgotten to install (or copy) the Microsoft C/C++ runtime .dlls (like vcruntime140.dll etc) they are needed by the OpenSSL .dlls I believe.

          K Offline
          K Offline
          KidBuu
          wrote on last edited by KidBuu
          #4

          @hskoglund Never mind, you were correct... mostly just wrong version of the MSVC.

          The "libcrypto-1_1-x64.dll" and "libssl-1_1-x64.dll" DLL files were built using Microsoft Visual Studio 2010 (I guess), and never updated (unfortunately). So it requires the Visual Studio 2010 Redistributable... Rather than just force users to install this on their PC's, I've included both MSVCR100.dll and MSVCP100.dll in the application folder.

          Thanks for the tip!

          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