Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Issues loading OpenSSL on Deploy
QtWS25 Last Chance

Issues loading OpenSSL on Deploy

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
opensslqt6.2deploymentwindows10msvc2019
3 Posts 2 Posters 2.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.
  • I Offline
    I Offline
    Iemon
    wrote on last edited by Iemon
    #1

    Hi, I have an application migrated from Qt 5.11.2 to Qt 6.2.3. It worked fine on v5.11 and v5.15 and also has no issues in Qt Creator after migrated to v6.2. But it seems like it is not loading OpenSSL dlls once deployed using windeployqt. First, here is my env:

    OS: Windows 10/Windows 11 x64
    Qt version: 6.2.2/6.2.3
    msvc: 2019 x64
    

    log in Qt Creator:

    [2022-02-25T10:36:38-08:00] INFO: {app } Supports SSL    ::  true
    [2022-02-25T14:08:51-08:00] INFO: {app} OpenSSL Library ::  269488303
    [2022-02-25T14:08:51-08:00] INFO: {app} Compile Time OpenSSL Build   ::  OpenSSL 1.1.1k  25 Mar 2021
    [2022-02-25T14:08:51-08:00] INFO: {app} Run Time OpenSSL Build ::  OpenSSL 1.1.1j  16 Feb 2021
    ...
    

    log once deployed:

    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] INFO: {app} Supports SSL    ::  false
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] INFO: {app} OpenSSL Library ::  -1
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] INFO: {app} Compile Time OpenSSL Build   ::  
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] INFO: {app} Run Time OpenSSL Build ::  
    ...
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
    [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No TLS backend is available
    ...
    

    According to the doc on Qt for Windows - Deployment, "if Qt was configured to link against ICU or OpenSSL, the respective DLL's need to be added to the release folder, too." So before running windeployqt, I added libcrypto-1_1-x64.dll and libssl-1_1-x64.dll from Qt\Qt6.2.2\Tools\OpenSSL\Win_x64\bin to the release (or out) folder. Still, the windeployqt log doesn't say anything about these two dlls but do create/update following 3 TLS dlls.

    windeployqt log:

    .\windeployqt.exe "C:\dev\<app name>\src\<build folder>\out"
    ...
    Creating directory C:/dev/<app name>/src/<build file>/out/tls.
    Updating qcertonlybackend.dll.
    Updating qopensslbackend.dll.
    Updating qschannelbackend.dll.
    ...
    

    Also when I tried to debug what dlls are loaded into the application using VS2019, I'm not seeing any of these TLS and OpenSSL dlls loaded.

    What I tried so far:

    • Adding dll locations to PATH (although I believe having them next to the executable should be fine)
    • Manually loading dlls in .pro file (i.e win32:LIB += libcrypto-1_1-x64.dll)
    • Using v1.1.1m OpenSSL downloaded from https://slproweb.com/products/Win32OpenSSL.html
    • Using v1.1.1j OpenSSL downloaded from the Qt maintenance tool

    Seeing SSL support is false I feel like I'm missing something. Maybe I should build v1.1.1k from source? Any hints would be greatly appreciated. Thanks!

    I 1 Reply Last reply
    0
    • I Iemon

      Hi, I have an application migrated from Qt 5.11.2 to Qt 6.2.3. It worked fine on v5.11 and v5.15 and also has no issues in Qt Creator after migrated to v6.2. But it seems like it is not loading OpenSSL dlls once deployed using windeployqt. First, here is my env:

      OS: Windows 10/Windows 11 x64
      Qt version: 6.2.2/6.2.3
      msvc: 2019 x64
      

      log in Qt Creator:

      [2022-02-25T10:36:38-08:00] INFO: {app } Supports SSL    ::  true
      [2022-02-25T14:08:51-08:00] INFO: {app} OpenSSL Library ::  269488303
      [2022-02-25T14:08:51-08:00] INFO: {app} Compile Time OpenSSL Build   ::  OpenSSL 1.1.1k  25 Mar 2021
      [2022-02-25T14:08:51-08:00] INFO: {app} Run Time OpenSSL Build ::  OpenSSL 1.1.1j  16 Feb 2021
      ...
      

      log once deployed:

      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] INFO: {app} Supports SSL    ::  false
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] INFO: {app} OpenSSL Library ::  -1
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] INFO: {app} Compile Time OpenSSL Build   ::  
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] INFO: {app} Run Time OpenSSL Build ::  
      ...
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No functional TLS backend was found
      [2022-02-25T13:21:37-08:00] WARNING: {qt.network.ssl} No TLS backend is available
      ...
      

      According to the doc on Qt for Windows - Deployment, "if Qt was configured to link against ICU or OpenSSL, the respective DLL's need to be added to the release folder, too." So before running windeployqt, I added libcrypto-1_1-x64.dll and libssl-1_1-x64.dll from Qt\Qt6.2.2\Tools\OpenSSL\Win_x64\bin to the release (or out) folder. Still, the windeployqt log doesn't say anything about these two dlls but do create/update following 3 TLS dlls.

      windeployqt log:

      .\windeployqt.exe "C:\dev\<app name>\src\<build folder>\out"
      ...
      Creating directory C:/dev/<app name>/src/<build file>/out/tls.
      Updating qcertonlybackend.dll.
      Updating qopensslbackend.dll.
      Updating qschannelbackend.dll.
      ...
      

      Also when I tried to debug what dlls are loaded into the application using VS2019, I'm not seeing any of these TLS and OpenSSL dlls loaded.

      What I tried so far:

      • Adding dll locations to PATH (although I believe having them next to the executable should be fine)
      • Manually loading dlls in .pro file (i.e win32:LIB += libcrypto-1_1-x64.dll)
      • Using v1.1.1m OpenSSL downloaded from https://slproweb.com/products/Win32OpenSSL.html
      • Using v1.1.1j OpenSSL downloaded from the Qt maintenance tool

      Seeing SSL support is false I feel like I'm missing something. Maybe I should build v1.1.1k from source? Any hints would be greatly appreciated. Thanks!

      I Offline
      I Offline
      Iemon
      wrote on last edited by
      #2

      I got a pre-compiled v1.1.1k OpenSSL library with no dependencies and tried to deploy again. No luck so far.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mjtDCP
        wrote on last edited by
        #3

        Copy qopensslbackend.dll in a tls folder next to your .exe, and DLL in your PATH :

        ./myexec.exe
        ./libcrypto-1_1-x64.dll
        ./libssl-1_1-x64.dll
        ./tls/qopensslbackend.dll

        1 Reply Last reply
        1

        • Login

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