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. no SSL support on Windows just for few users...
Forum Updated to NodeBB v4.3 + New Features

no SSL support on Windows just for few users...

Scheduled Pinned Locked Moved Solved General and Desktop
20 Posts 6 Posters 1.9k 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.
  • mbruelM Offline
    mbruelM Offline
    mbruel
    wrote on last edited by
    #1

    Hi,

    I don't understand why on certain environments (Win10 64bit or Server 2019), Windows is not loading the SSL dlls (libssl-1_1-x64.dll and libcrypto-1_1-x64.dll) and thus I don't get SSL support...

    I've read many posts on what could be wrong... and mainly it should be the dll included.
    So I'm building on Windows with Qt v5.12.5 with MinGW 7.3 64bit.
    I provide with the app:

    ; dlls
    Source: "{#ApplicationBuildDir}\libs\libcrypto-1_1-x64.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#ApplicationBuildDir}\libs\libgcc_s_seh-1.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#ApplicationBuildDir}\libs\libssl-1_1-x64.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#ApplicationBuildDir}\libs\libstdc++-6.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#ApplicationBuildDir}\libs\libwinpthread-1.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    
    ; Qt dlls
    Source: "{#QtBinDir}\Qt5Core.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#QtBinDir}\Qt5DBus.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion    
    Source: "{#QtBinDir}\Qt5Gui.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#QtBinDir}\Qt5Network.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion
    Source: "{#QtBinDir}\Qt5Widgets.dll"; DestDir: "{#DestinationDir}"; Flags: ignoreversion 
    
    ; Qt plugins
    Source: "{#QtPluginsDir}\bearer\qgenericbearer.dll"; DestDir: "{#DestinationDir}\bearer"; Flags: ignoreversion
    Source: "{#QtPluginsDir}\platforms\qwindows.dll"; DestDir: "{#DestinationDir}\platforms"; Flags: ignoreversion
    

    libssl-1_1-x64.dll and libcrypto-1_1-x64.dll were v1.1.1c, those provided with Qt Tools.
    I've noticed, Qt v5.12 is built using v1.1.1b
    So I've asked my users having issue with No SSL support to try to replace the dlls with those of 1.1.1b (available here) but the problem is the same...

    I've this output:

        if (_ngPost->debugMode())
            _log(QString("SSL support: %1, build version: %2, system version: %3").arg(QSslSocket::supportsSsl() ? "yes" : "no").arg(
                     QSslSocket::sslLibraryBuildVersionString()).arg(QSslSocket::sslLibraryVersionString()));
    

    And they're still getting this output: "SSL support: no, build version: OpenSSL 1.1.1b 26 Feb 2019, system version:"

    I'm running out of ideas...
    Just a few persons have this issue. Most of the users don't have any problem. (using the same setup file for deployment so having the same dlls...)

    I've found Microsoft ListDLLs tool and asked the user to run it. Here is his output. We clearly see that both openssl dll are not loaded. Any idea why?
    To compare, here is the output of ListDlls on my Win7 VM that properly loads openssl dlls.

    Could it come from windows CRYPT32.dll or CRYPTBASE.DLL? He's having a much more recent version than mine (10.0.18362.1 rather then 6.1.7601.17514)

    I'm completely running out of ideas...
    What would you suggest to try?

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

      Hi, 2 suggestions for the problematic users: try disabling the ESET antivirus and also try downloading the MSVC2015 redistributable (early Windows 10 versions does not have it).

      mbruelM 1 Reply Last reply
      2
      • hskoglundH hskoglund

        Hi, 2 suggestions for the problematic users: try disabling the ESET antivirus and also try downloading the MSVC2015 redistributable (early Windows 10 versions does not have it).

        mbruelM Offline
        mbruelM Offline
        mbruel
        wrote on last edited by mbruel
        #3

        @hskoglund said in no SSL support on Windows just for few users...:

        Hi, 2 suggestions for the problematic users: try disabling the ESET antivirus and also try downloading the MSVC2015 redistributable (early Windows 10 versions does not have it).

        They tried already without firewall (not antivirus) but I can ask...
        Why would they need msvc? I'm using mingw version... (their win10 version is supposed to be newer than the one I'm testing on successfully (I'm having win7))

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

          Hi,

          Do you mean of Qt or OpenSSL ? Both ?

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

          mbruelM 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Do you mean of Qt or OpenSSL ? Both ?

            mbruelM Offline
            mbruelM Offline
            mbruel
            wrote on last edited by
            #5

            @SGaist said in no SSL support on Windows just for few users...:

            Hi,

            Do you mean of Qt or OpenSSL ? Both ?

            Not sure what you mean. It's my Qt app that is not getting SSL support.
            They don't have openssl installed I suppose.
            I'm providing openssl dlls in the folder of my app. BUT windows is not loading them... not sure why?
            Should I maybe rename them to remove the version number?

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

              You may have your Qt version built with MinGW and OpenSSL built with MSVC.

              In any case, you can check if you have everything required using Dependency Walker on these .dlls.

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

              mbruelM 1 Reply Last reply
              2
              • SGaistS SGaist

                You may have your Qt version built with MinGW and OpenSSL built with MSVC.

                In any case, you can check if you have everything required using Dependency Walker on these .dlls.

                mbruelM Offline
                mbruelM Offline
                mbruel
                wrote on last edited by mbruel
                #7

                @SGaist said in no SSL support on Windows just for few users...:

                You may have your Qt version built with MinGW and OpenSSL built with MSVC.

                In any case, you can check if you have everything required using Dependency Walker on these .dlls.

                What sould I open with the dependency walker? neither my app nor Qt5Network depends on libssl... it's hidden as it's not necessarily needed...
                How can I know if the libssl dlls are built with mingw or msvc?
                What about those provided with Qt Tools? (Qt\Tools\Openssl\win_x64\bin)
                I suppose that's the MinGW versions as the SSL support is working for most Windows environment.
                I've this issue only for few users. So I'd think it's a loading issue...
                If you look at my log of the Dlls loaded on my win7, you can see that the dll I'm supplying are loaded.

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

                  Open the OpenSSL dlls with Dependency Walker.

                  Qt dlopen's the OpenSSL libraries. It's not compiled against it because of some international law with regard to distributing encryption enabled software.

                  As @hskoglund already suggested, you might be missing the runtime required by the OpenSSL dlls.

                  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
                  2
                  • mbruelM Offline
                    mbruelM Offline
                    mbruel
                    wrote on last edited by
                    #9

                    So would that be MSVC*.DLL we can see there

                    alt text

                    Can I provide those dlls within my app next to libssl and libcrypto or does the user HAS to install MSVC2015 redistributable?

                    Is it possible to find Windows libssl dlls compiled with MinGW?

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Bob64
                      wrote on last edited by
                      #10

                      I have no insight into the specific problem here but, if you don't get anywhere with Dependency Walker, Process Monitor can also be very useful in tracking down reasons for DLL loading issues.

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

                        MSVCR100.dll means that you need to check whether the computer having issue are missing that version of the Microsoft runtime libraries. One other way is to make them part of your application release.

                        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
                        • B Bob64

                          I have no insight into the specific problem here but, if you don't get anywhere with Dependency Walker, Process Monitor can also be very useful in tracking down reasons for DLL loading issues.

                          mbruelM Offline
                          mbruelM Offline
                          mbruel
                          wrote on last edited by
                          #12

                          @Bob64 said in no SSL support on Windows just for few users...:

                          I have no insight into the specific problem here but, if you don't get anywhere with Dependency Walker, Process Monitor can also be very useful in tracking down reasons for DLL loading issues.

                          The problem is that I don't have the issue on my environment. Only one user gets the issue on his computer. He tested on another one (his wife) and it's working fine. So it's pretty difficult to debug...

                          B 1 Reply Last reply
                          0
                          • mbruelM Offline
                            mbruelM Offline
                            mbruel
                            wrote on last edited by mbruel
                            #13

                            hum, he has errors in WS2_32.DLL...
                            alt text

                            So I guess nothing I can do within the app...
                            He must install MSVC2015 redistributable?
                            are we sure that this is what's missing? why MSVC2015 and not MSVC2017 or more recent?

                            Edit: that's crap, is there a way to find dlls (maybe compiled with MinGW) that would not need that?
                            or can I provide all those api-ms-win-core*.dll within my app?

                            1 Reply Last reply
                            0
                            • mbruelM mbruel

                              @Bob64 said in no SSL support on Windows just for few users...:

                              I have no insight into the specific problem here but, if you don't get anywhere with Dependency Walker, Process Monitor can also be very useful in tracking down reasons for DLL loading issues.

                              The problem is that I don't have the issue on my environment. Only one user gets the issue on his computer. He tested on another one (his wife) and it's working fine. So it's pretty difficult to debug...

                              B Offline
                              B Offline
                              Bob64
                              wrote on last edited by
                              #14

                              @mbruel If possible, get the user to install Process Monitor in the problematic environment and send you the log. Sometimes this allows you to pinpoint what is failing to load, especially if you can cross reference a log from a successful environment. I wouldn't necessarily recommend this unless you really are stuck, as it can be a lot of work, but it has got me out of a hole on a few occasions.

                              1 Reply Last reply
                              0
                              • mbruelM Offline
                                mbruelM Offline
                                mbruel
                                wrote on last edited by mbruel
                                #15

                                @Bob64 said in no SSL support on Windows just for few users...:

                                get the user to install Process Monitor in the problematic environment and send you the log

                                I don't know how to use Process Monitor, on my win7 VM (I'm on Debian), it's failing to open due to lack of drivers.

                                My user tried to install msvc2015 redistributable, it didn't make the SSL work.
                                He tried to copy the msvcr100.dll I provided him. and now it is working.

                                How come libssl v1.1.1 (from 2019) could still depend on msvc 2010? oO
                                Is there a way to build openssl to not have those msvc dependencies?

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

                                  Why 2010 ? Backward compatibility with really old systems I would guess.

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

                                  mbruelM 1 Reply Last reply
                                  1
                                  • SGaistS SGaist

                                    Why 2010 ? Backward compatibility with really old systems I would guess.

                                    mbruelM Offline
                                    mbruelM Offline
                                    mbruel
                                    wrote on last edited by
                                    #17

                                    @SGaist yeah but then not compatible with newest versions out of the box... :\

                                    1 Reply Last reply
                                    0
                                    • mbruelM Offline
                                      mbruelM Offline
                                      mbruel
                                      wrote on last edited by
                                      #18

                                      I suppose Qt MinGW version is built agains this libssl version requiring msvc 2010 right?
                                      So even if I wanted, I couldn't compile it myself (libssl) without msvc and providing it.
                                      Is it right?

                                      S 1 Reply Last reply
                                      0
                                      • mbruelM mbruel

                                        I suppose Qt MinGW version is built agains this libssl version requiring msvc 2010 right?
                                        So even if I wanted, I couldn't compile it myself (libssl) without msvc and providing it.
                                        Is it right?

                                        S Offline
                                        S Offline
                                        stephane78 0
                                        wrote on last edited by
                                        #19

                                        @mbruel Hi ,if you use mingw or mingw-w64 you can compile openssl with it from the sources, and then compile Qt from the sources, with the support of openssl (option in configure of Qt)

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          Mozi
                                          wrote on last edited by
                                          #20

                                          Hi! @mbruel .

                                          Please try lucasg/Dependencies. It's A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues. This tool can resolve dependencies with the dlls from Windows API Sets.

                                          By the way, there are still some bugs in the latest release version (f.e., Dependencies#102). You can checkout the newest build from CI, or wait for the next release.

                                          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