SSL error in latest nightly

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SSL error in latest nightly

lasso2

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: SSL error in latest nightly

Jean-Christophe Fillion-Robin
Hi Andras,

I am not able to reproduce the issue using Windows 7.


That said,  looking at the Qt source code, I suggest the following workaround:

  * build tree:  Copy libeay32.dll and ssleay32.dll from C:\Slicer-build/OpenSSL-install\Release\bin\ to C:\Support\qt-4.8.7-64-vs2013-rel\bin

  * install tree: Copy the same dll from <installroot>/lib\Slicer-4.7 to <installroot>/bin


If you confirm that this work, it will quite easy to fix the build system..




And for the one who are interested, here are the details
------------------------------------------------------------------------


Looking at the qt source code, we can see that QSslSocket effectively tries to load ssl libraries from a non system location. This is the "load(false)" See [1], [2]
So far, so good.



Then, looking at the implementation of the "load()" function. See [3]
We can see that it does the following:

 1) searchOrder << QFileInfo(qAppFileName()).path();

 2) searchOrder << qSystemDirectory();

 3) searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);



This tells us that on windows platform where there is no ssl libraries installed in system directories, the paths from PATH env variable will be considered. Since the path to OpenSSL libraries are in the PATH. This will work. See [4]



Now, in the case where there is an SSL installed on the system ... we need qAppFileName() to resolve to the path where our version OpenSSL libraries is available.
Let's try to figure this out.



Implementation of qAppFileName() is in qcoreapplication_win.cpp  . And as we can see in [5], it uses the windows system function "GetModuleFileName". Based on the windows documentation [6], this function returns the path of the current DLL which in this case is most likely QNetwork4.dll


This means that the ssl libraries needs to be along side the Qt libraries.

On Mon, Mar 27, 2017 at 5:43 PM, Andras Lasso <[hidden email]> wrote:

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ



--
+1 919 869 8849

_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: SSL error in latest nightly

lasso2
In reply to this post by lasso2

Thank you for the investigation. I confirm that moving the two dlls into the <installroot>/bin directory solves the problem. Interestingly, the problem occurs only on certain computers, and even on those, it depends on where I start the Slicer.exe from (start menu link / command prompt, current director location).

 

Andras

 

From: Jean-Christophe Fillion-Robin [mailto:[hidden email]]
Sent: March 28, 2017 22:08
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

Hi Andras,

I am not able to reproduce the issue using Windows 7.

 

 

That said,  looking at the Qt source code, I suggest the following workaround:

  * build tree:  Copy libeay32.dll and ssleay32.dll from C:\Slicer-build/OpenSSL-install\Release\bin\ to C:\Support\qt-4.8.7-64-vs2013-rel\bin

 

  * install tree: Copy the same dll from <installroot>/lib\Slicer-4.7 to <installroot>/bin

 

 

If you confirm that this work, it will quite easy to fix the build system..

 

 

 

 

And for the one who are interested, here are the details

------------------------------------------------------------------------

 

Looking at the qt source code, we can see that QSslSocket effectively tries to load ssl libraries from a non system location. This is the "load(false)" See [1], [2]
So far, so good.



Then, looking at the implementation of the "load()" function. See [3]

We can see that it does the following:

 1) searchOrder << QFileInfo(qAppFileName()).path();

 2) searchOrder << qSystemDirectory();

 3) searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);


This tells us that on windows platform where there is no ssl libraries installed in system directories, the paths from PATH env variable will be considered. Since the path to OpenSSL libraries are in the PATH. This will work. See [4]



Now, in the case where there is an SSL installed on the system ... we need qAppFileName() to resolve to the path where our version OpenSSL libraries is available.
Let's try to figure this out.



Implementation of qAppFileName() is in qcoreapplication_win.cpp  . And as we can see in [5], it uses the windows system function "GetModuleFileName". Based on the windows documentation [6], this function returns the path of the current DLL which in this case is most likely QNetwork4.dll

This means that the ssl libraries needs to be along side the Qt libraries.

 

On Mon, Mar 27, 2017 at 5:43 PM, Andras Lasso <[hidden email]> wrote:

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

+1 919 869 8849


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: SSL error in latest nightly

Isaiah Norton-2
I couldn't reproduce on Windows 10 either, with 3/27 nightly. Maybe another software installed incompatible versions of these DLLs in the system directory. You could start Dependency Walker from the Slicer launcher and then load QNetwork4.dll to see if it is trying to open some foreign DLL (Dep. W. hooks LoadLibrary).

On Wed, Mar 29, 2017 at 8:45 AM, Andras Lasso <[hidden email]> wrote:

Thank you for the investigation. I confirm that moving the two dlls into the <installroot>/bin directory solves the problem. Interestingly, the problem occurs only on certain computers, and even on those, it depends on where I start the Slicer.exe from (start menu link / command prompt, current director location).

 

Andras

 

From: Jean-Christophe Fillion-Robin [mailto:[hidden email]]
Sent: March 28, 2017 22:08
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

Hi Andras,

I am not able to reproduce the issue using Windows 7.

 

 

That said,  looking at the Qt source code, I suggest the following workaround:

  * build tree:  Copy libeay32.dll and ssleay32.dll from C:\Slicer-build/OpenSSL-install\Release\bin\ to C:\Support\qt-4.8.7-64-vs2013-rel\bin

 

  * install tree: Copy the same dll from <installroot>/lib\Slicer-4.7 to <installroot>/bin

 

 

If you confirm that this work, it will quite easy to fix the build system..

 

 

 

 

And for the one who are interested, here are the details

------------------------------------------------------------------------

 

Looking at the qt source code, we can see that QSslSocket effectively tries to load ssl libraries from a non system location. This is the "load(false)" See [1], [2]
So far, so good.



Then, looking at the implementation of the "load()" function. See [3]

We can see that it does the following:

 1) searchOrder << QFileInfo(qAppFileName()).path();

 2) searchOrder << qSystemDirectory();

 3) searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);


This tells us that on windows platform where there is no ssl libraries installed in system directories, the paths from PATH env variable will be considered. Since the path to OpenSSL libraries are in the PATH. This will work. See [4]



Now, in the case where there is an SSL installed on the system ... we need qAppFileName() to resolve to the path where our version OpenSSL libraries is available.
Let's try to figure this out.



Implementation of qAppFileName() is in qcoreapplication_win.cpp  . And as we can see in [5], it uses the windows system function "GetModuleFileName". Based on the windows documentation [6], this function returns the path of the current DLL which in this case is most likely QNetwork4.dll

This means that the ssl libraries needs to be along side the Qt libraries.

 

On Mon, Mar 27, 2017 at 5:43 PM, Andras Lasso <[hidden email]> wrote:

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

<a href="tel:(919)%20869-8849" value="&#43;19198698849" target="_blank">+1 919 869 8849


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: SSL error in latest nightly

lasso2
In reply to this post by lasso2

I’ve checked with dependency walker and all paths seemed to be correct (full path of libeay32.dll and ssleay32.dll was the one in the Slicer package). I’ve added some logs and it turned out that

HINSTANCE inst = ::LoadLibrary((const wchar_t *)fullPathAttempt.utf16());

call failed although fullPathAttempt contained the correct path of ssleay32.dll. After a restart the error disappeared and I cannot reproduce the problem anymore.

 

We can either keep everything as is to see if the error pops up again (and then we can investigate some more) or be on the safe side and install the SSL DLLs in the main Slicer executable’s directory.

 

Andras

 

From: Isaiah Norton [mailto:[hidden email]]
Sent: March 29, 2017 9:39
To: Andras Lasso <[hidden email]>
Cc: Jean-Christophe Fillion-Robin <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

I couldn't reproduce on Windows 10 either, with 3/27 nightly. Maybe another software installed incompatible versions of these DLLs in the system directory. You could start Dependency Walker from the Slicer launcher and then load QNetwork4.dll to see if it is trying to open some foreign DLL (Dep. W. hooks LoadLibrary).

 

On Wed, Mar 29, 2017 at 8:45 AM, Andras Lasso <[hidden email]> wrote:

Thank you for the investigation. I confirm that moving the two dlls into the <installroot>/bin directory solves the problem. Interestingly, the problem occurs only on certain computers, and even on those, it depends on where I start the Slicer.exe from (start menu link / command prompt, current director location).

 

Andras

 

From: Jean-Christophe Fillion-Robin [mailto:[hidden email]]
Sent: March 28, 2017 22:08
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

Hi Andras,

I am not able to reproduce the issue using Windows 7.

 

 

That said,  looking at the Qt source code, I suggest the following workaround:

  * build tree:  Copy libeay32.dll and ssleay32.dll from C:\Slicer-build/OpenSSL-install\Release\bin\ to C:\Support\qt-4.8.7-64-vs2013-rel\bin

 

  * install tree: Copy the same dll from <installroot>/lib\Slicer-4.7 to <installroot>/bin

 

 

If you confirm that this work, it will quite easy to fix the build system..

 

 

 

 

And for the one who are interested, here are the details

------------------------------------------------------------------------

 

Looking at the qt source code, we can see that QSslSocket effectively tries to load ssl libraries from a non system location. This is the "load(false)" See [1], [2]
So far, so good.

 

Then, looking at the implementation of the "load()" function. See [3]

We can see that it does the following:

 1) searchOrder << QFileInfo(qAppFileName()).path();

 2) searchOrder << qSystemDirectory();

 3) searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);


This tells us that on windows platform where there is no ssl libraries installed in system directories, the paths from PATH env variable will be considered. Since the path to OpenSSL libraries are in the PATH. This will work. See [4]



Now, in the case where there is an SSL installed on the system ... we need qAppFileName() to resolve to the path where our version OpenSSL libraries is available.
Let's try to figure this out.

 

Implementation of qAppFileName() is in qcoreapplication_win.cpp  . And as we can see in [5], it uses the windows system function "GetModuleFileName". Based on the windows documentation [6], this function returns the path of the current DLL which in this case is most likely QNetwork4.dll

This means that the ssl libraries needs to be along side the Qt libraries.

 

On Mon, Mar 27, 2017 at 5:43 PM, Andras Lasso <[hidden email]> wrote:

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

<a href="tel:(919)%20869-8849" target="_blank">+1 919 869 8849


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: SSL error in latest nightly

Jean-Christophe Fillion-Robin
In reply to this post by lasso2
Hi Andras,

Thanks for the report.

Since this is urgent, I could do it later or review a PR implementing the change.

Jc

On Wed, Mar 29, 2017 at 1:25 PM, Andras Lasso <[hidden email]> wrote:

I’ve checked with dependency walker and all paths seemed to be correct (full path of libeay32.dll and ssleay32.dll was the one in the Slicer package). I’ve added some logs and it turned out that

HINSTANCE inst = ::LoadLibrary((const wchar_t *)fullPathAttempt.utf16());

call failed although fullPathAttempt contained the correct path of ssleay32.dll. After a restart the error disappeared and I cannot reproduce the problem anymore.

 

We can either keep everything as is to see if the error pops up again (and then we can investigate some more) or be on the safe side and install the SSL DLLs in the main Slicer executable’s directory.

 

Andras

 

From: Isaiah Norton [mailto:[hidden email]]
Sent: March 29, 2017 9:39
To: Andras Lasso <[hidden email]>
Cc: Jean-Christophe Fillion-Robin <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] SSL error in latest nightly

 

I couldn't reproduce on Windows 10 either, with 3/27 nightly. Maybe another software installed incompatible versions of these DLLs in the system directory. You could start Dependency Walker from the Slicer launcher and then load QNetwork4.dll to see if it is trying to open some foreign DLL (Dep. W. hooks LoadLibrary).

 

On Wed, Mar 29, 2017 at 8:45 AM, Andras Lasso <[hidden email]> wrote:

Thank you for the investigation. I confirm that moving the two dlls into the <installroot>/bin directory solves the problem. Interestingly, the problem occurs only on certain computers, and even on those, it depends on where I start the Slicer.exe from (start menu link / command prompt, current director location).

 

Andras

 

From: Jean-Christophe Fillion-Robin [mailto:[hidden email]]
Sent: March 28, 2017 22:08
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

Hi Andras,

I am not able to reproduce the issue using Windows 7.

 

 

That said,  looking at the Qt source code, I suggest the following workaround:

  * build tree:  Copy libeay32.dll and ssleay32.dll from C:\Slicer-build/OpenSSL-install\Release\bin\ to C:\Support\qt-4.8.7-64-vs2013-rel\bin

 

  * install tree: Copy the same dll from <installroot>/lib\Slicer-4.7 to <installroot>/bin

 

 

If you confirm that this work, it will quite easy to fix the build system..

 

 

 

 

And for the one who are interested, here are the details

------------------------------------------------------------------------

 

Looking at the qt source code, we can see that QSslSocket effectively tries to load ssl libraries from a non system location. This is the "load(false)" See [1], [2]
So far, so good.

 

Then, looking at the implementation of the "load()" function. See [3]

We can see that it does the following:

 1) searchOrder << QFileInfo(qAppFileName()).path();

 2) searchOrder << qSystemDirectory();

 3) searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);


This tells us that on windows platform where there is no ssl libraries installed in system directories, the paths from PATH env variable will be considered. Since the path to OpenSSL libraries are in the PATH. This will work. See [4]



Now, in the case where there is an SSL installed on the system ... we need qAppFileName() to resolve to the path where our version OpenSSL libraries is available.
Let's try to figure this out.

 

Implementation of qAppFileName() is in qcoreapplication_win.cpp  . And as we can see in [5], it uses the windows system function "GetModuleFileName". Based on the windows documentation [6], this function returns the path of the current DLL which in this case is most likely QNetwork4.dll

This means that the ssl libraries needs to be along side the Qt libraries.

 

On Mon, Mar 27, 2017 at 5:43 PM, Andras Lasso <[hidden email]> wrote:

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

<a href="tel:(919)%20869-8849" target="_blank">+1 919 869 8849


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 




--
+1 919 869 8849

_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: SSL error in latest nightly

lasso2
In reply to this post by lasso2

As the problem went away, we can just wait and watch if it occurs again.

 

Andras

 

From: Jean-Christophe Fillion-Robin [mailto:[hidden email]]
Sent: March 29, 2017 15:28
To: Andras Lasso <[hidden email]>
Cc: Isaiah Norton <[hidden email]>; SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

Hi Andras,

Thanks for the report.

Since this is urgent, I could do it later or review a PR implementing the change.

Jc

 

On Wed, Mar 29, 2017 at 1:25 PM, Andras Lasso <[hidden email]> wrote:

I’ve checked with dependency walker and all paths seemed to be correct (full path of libeay32.dll and ssleay32.dll was the one in the Slicer package). I’ve added some logs and it turned out that

HINSTANCE inst = ::LoadLibrary((const wchar_t *)fullPathAttempt.utf16());

call failed although fullPathAttempt contained the correct path of ssleay32.dll. After a restart the error disappeared and I cannot reproduce the problem anymore.

 

We can either keep everything as is to see if the error pops up again (and then we can investigate some more) or be on the safe side and install the SSL DLLs in the main Slicer executable’s directory.

 

Andras

 

From: Isaiah Norton [mailto:[hidden email]]
Sent: March 29, 2017 9:39
To: Andras Lasso <[hidden email]>
Cc: Jean-Christophe Fillion-Robin <[hidden email]>; SPL Slicer Devel <[hidden email]>


Subject: Re: [slicer-devel] SSL error in latest nightly

 

I couldn't reproduce on Windows 10 either, with 3/27 nightly. Maybe another software installed incompatible versions of these DLLs in the system directory. You could start Dependency Walker from the Slicer launcher and then load QNetwork4.dll to see if it is trying to open some foreign DLL (Dep. W. hooks LoadLibrary).

 

On Wed, Mar 29, 2017 at 8:45 AM, Andras Lasso <[hidden email]> wrote:

Thank you for the investigation. I confirm that moving the two dlls into the <installroot>/bin directory solves the problem. Interestingly, the problem occurs only on certain computers, and even on those, it depends on where I start the Slicer.exe from (start menu link / command prompt, current director location).

 

Andras

 

From: Jean-Christophe Fillion-Robin [mailto:[hidden email]]
Sent: March 28, 2017 22:08
To: Andras Lasso <[hidden email]>
Cc: SPL Slicer Devel <[hidden email]>
Subject: Re: [slicer-devel] SSL error in latest nightly

 

Hi Andras,

I am not able to reproduce the issue using Windows 7.

 

 

That said,  looking at the Qt source code, I suggest the following workaround:

  * build tree:  Copy libeay32.dll and ssleay32.dll from C:\Slicer-build/OpenSSL-install\Release\bin\ to C:\Support\qt-4.8.7-64-vs2013-rel\bin

 

  * install tree: Copy the same dll from <installroot>/lib\Slicer-4.7 to <installroot>/bin

 

 

If you confirm that this work, it will quite easy to fix the build system..

 

 

 

 

And for the one who are interested, here are the details

------------------------------------------------------------------------

 

Looking at the qt source code, we can see that QSslSocket effectively tries to load ssl libraries from a non system location. This is the "load(false)" See [1], [2]
So far, so good.

 

Then, looking at the implementation of the "load()" function. See [3]

We can see that it does the following:

 1) searchOrder << QFileInfo(qAppFileName()).path();

 2) searchOrder << qSystemDirectory();

 3) searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts);


This tells us that on windows platform where there is no ssl libraries installed in system directories, the paths from PATH env variable will be considered. Since the path to OpenSSL libraries are in the PATH. This will work. See [4]



Now, in the case where there is an SSL installed on the system ... we need qAppFileName() to resolve to the path where our version OpenSSL libraries is available.
Let's try to figure this out.

 

Implementation of qAppFileName() is in qcoreapplication_win.cpp  . And as we can see in [5], it uses the windows system function "GetModuleFileName". Based on the windows documentation [6], this function returns the path of the current DLL which in this case is most likely QNetwork4.dll

This means that the ssl libraries needs to be along side the Qt libraries.

 

On Mon, Mar 27, 2017 at 5:43 PM, Andras Lasso <[hidden email]> wrote:

Hi Jc,

 

SSL is not working in the latest nightly on Windows. For example, images hosted on https sites are not showing up in extension manager. There are also error and warning messages in the log (see details below).

SSL is broken the same way on the release that I build on my computer, so the problem is not specific to factory builds.

 

Could you please have a look?

 

Thank you,

Andras

 

 

Messages on console:

 

[SSL] SSL support disabled - Failed to load SSL library !

[SSL] Failed to load Slicer.crt

 

Application log:

 

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Session start time .......: 2017-03-27 17:34:01

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Slicer version ...........: 4.7.0-2017-03-25 (revision 25872) win-amd64 - installed

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Operating system .........: Windows / Professional / (Build 9200) - 64-bit

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Memory ...................: 8118 MB physical, 16236 MB virtual

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - CPU ......................: GenuineIntel , 4 cores, 16 logical processors

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Developer mode enabled ...: no

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Prefer executable CLI ....: yes

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Additional module paths ..: (none)

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor

[DEBUG][Python] 27.03.2017 17:34:03 [Python] (C:\Program Files\Slicer 4.7.0-2017-03-25\lib\Slicer-4.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics

[DEBUG][Qt] 27.03.2017 17:34:01 [] (unknown:0) - Number of registered modules: 140

[DEBUG][Qt] 27.03.2017 17:34:02 [] (unknown:0) - Number of instantiated modules: 140

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "CLIEventTest" , the dependency "CLI4Test" failed to be loaded.

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - Initializing terminology mapping for map file C:/Program Files/Slicer 4.7.0-2017-03-25/share/Slicer-4.7/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv

[INFO][Stream] 27.03.2017 17:34:03 [] (unknown:0) - 288 terms were read for Slicer LUT GenericAnatomyColors

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - QMetaObject::invokeMethod: No such method qSlicerSubjectHierarchyVolumesPlugin::onLayoutChanged()

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInARowTest" , the dependency "CLI4Test" failed to be loaded.

[WARNING][Qt] 27.03.2017 17:34:03 [] (unknown:0) - When loading module "TwoCLIsInParallelTest" , the dependency "CLI4Test" failed to be loaded.

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Number of loaded modules: 137

[DEBUG][Qt] 27.03.2017 17:34:04 [] (unknown:0) - Switch to module: "Welcome"

[INFO][Stream] 27.03.2017 17:34:04 [] (unknown:0) - Loading Slicer RC file [C:/Users/msliv/.slicerrc.py]

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_library_init

[WARNING][Qt] 27.03.2017 17:34:12 [] (unknown:0) - QSslSocket: cannot call unresolved function ERR_get_error

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSLv23_client_method

[WARNING][Qt] 27.03.2017 17:34:13 [] (unknown:0) - QSslSocket: cannot call unresolved function SSL_CTX_new

 


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ




--

<a href="tel:(919)%20869-8849" target="_blank">+1 919 869 8849


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ

 




--

+1 919 869 8849


_______________________________________________
slicer-devel mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ