View Issue Details

IDProjectCategoryView StatusLast Update
0004067Slicer4Core: Base Codepublic2017-06-10 08:51
Reporterfedorov Assigned Tojcfr  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.4.0 
Target VersionSlicer 4.5.0-1Fixed in VersionSlicer 4.5.0-1 
Summary0004067: python urlopen CERTIFICATE_VERIFY_FAILED error
Description

There is a problem with using SSL connections as described in this thread:

http://slicer-devel.65872.n3.nabble.com/python-urlopen-CERTIFICATE-VERIFY-FAILED-error-in-TCIABrowser-td4035350.html

TagsNo tags attached.

Activities

jcfr

jcfr

2015-10-23 11:59

administrator   ~0013395

Thanks for reporting the problem.

Which platform is impacted by this issue ?

fedorov

fedorov

2015-10-23 12:07

developer   ~0013396

Last edited: 2015-10-23 12:08

I have this problem with today's nightly on Mac.

Is this message on Slicer startup expected:

[SSL] Failed to load Slicer.crt

?

fedorov

fedorov

2015-10-23 12:12

developer   ~0013397

At the same time, the test is passing on the dashboard mac: http://slicer.cdash.org/testDetails.php?test=6859382&build=691530

jcfr

jcfr

2015-10-23 12:14

administrator   ~0013398

Fixed in r24658
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24658

jcfr

jcfr

2015-10-23 12:15

administrator   ~0013399

The problem is that the dashboard doesn't test the packaged application. It only run the tests within a build tree.

fedorov

fedorov

2015-10-23 12:17

developer   ~0013400

Aha! Thanks a lot!

I will close the issue once I confirm it is working in the nightly.

fedorov

fedorov

2015-10-24 13:33

developer   ~0013423

Last edited: 2015-10-24 13:33

Unfortunately, the problem is still there. The missing cert error on startup is gone, but I am still unable to open https URLs.

Tested with today's nighty on Mac: 4.4.0-2015-10-23 r24659

Steps to reproduce:

import urllib2
urllib2.urlopen('https://services.cancerimagingarchive.net/services/TCIA/TCIA/query')

Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/Slicer-nightly/Slicer.app/Contents/lib/Python/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/Applications/Slicer-nightly/Slicer.app/Contents/lib/Python/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/Applications/Slicer-nightly/Slicer.app/Contents/lib/Python/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/Applications/Slicer-nightly/Slicer.app/Contents/lib/Python/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/Applications/Slicer-nightly/Slicer.app/Contents/lib/Python/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/Applications/Slicer-nightly/Slicer.app/Contents/lib/Python/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

jcfr

jcfr

2015-10-24 13:55

administrator   ~0013424

From a terminal, could you then try something like:

export SSL_CERT_FILE=/path/to/Slicer.app/Contents/share/Slicer-4.4/Slicer.crt

Then:

open -a /path/to/Slicer.app

And let me know.

fedorov

fedorov

2015-10-24 14:00

developer   ~0013425

With explicit import, it works fine.

jcfr

jcfr

2015-10-24 14:04

administrator   ~0013426

To clarify, when you mention with "explicit import", you mean that by first setting the env. variable "SSL_CERT_FILE", it works ?

fedorov

fedorov

2015-10-24 18:28

developer   ~0013427

Correct.

jcfr

jcfr

2015-10-25 18:29

administrator   ~0013428

That last issue should be fixed in r24662
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=24662

jcfr

jcfr

2015-10-25 22:29

administrator   ~0013429

I just confirmed that the generated MacOSX package now behave as expected:

factory@kitware:/Users/kitware/Dashboards/Nightly/Slicer-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.4.0-2015-10-25-macosx-amd64/Slicer.app/Contents> ./MacOS/Slicer -c "import urllib2;print(urllib2.urlopen('https://www.eff.org/https-everywhere').getcode())&quot;
200

fedorov

fedorov

2015-10-26 03:26

developer   ~0013430

Confirmed it is working now, thank you!

Related Changesets

Import 2017-06-07 23:51:09: master d897bddf

2015-10-23 15:38:06

jcfr

Details Diff
BUG: Fix installation of Slicer.crt on MacOSX. Fixes 0004067

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24658 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTCore/CMakeLists.txt Diff File

Issue History

Date Modified Username Field Change
2015-10-23 11:58 fedorov New Issue
2015-10-23 11:58 fedorov Status new => assigned
2015-10-23 11:58 fedorov Assigned To => jcfr
2015-10-23 11:59 jcfr Note Added: 0013395
2015-10-23 12:07 fedorov Note Added: 0013396
2015-10-23 12:08 fedorov Note Edited: 0013396
2015-10-23 12:12 fedorov Note Added: 0013397
2015-10-23 12:14 jcfr Note Added: 0013398
2015-10-23 12:14 jcfr Status assigned => resolved
2015-10-23 12:14 jcfr Fixed in Version => Slicer 4.5.0-1
2015-10-23 12:14 jcfr Resolution open => fixed
2015-10-23 12:15 jcfr Target Version => Slicer 4.5.0-1
2015-10-23 12:15 jcfr Note Added: 0013399
2015-10-23 12:17 fedorov Note Added: 0013400
2015-10-24 13:33 fedorov Note Added: 0013423
2015-10-24 13:33 fedorov Status resolved => feedback
2015-10-24 13:33 fedorov Resolution fixed => reopened
2015-10-24 13:33 fedorov Note Edited: 0013423
2015-10-24 13:55 jcfr Note Added: 0013424
2015-10-24 14:00 fedorov Note Added: 0013425
2015-10-24 14:04 jcfr Note Added: 0013426
2015-10-24 18:28 fedorov Note Added: 0013427
2015-10-25 18:29 jcfr Note Added: 0013428
2015-10-25 18:29 jcfr Status feedback => resolved
2015-10-25 18:29 jcfr Resolution reopened => fixed
2015-10-25 22:29 jcfr Note Added: 0013429
2015-10-26 03:26 fedorov Note Added: 0013430
2015-10-26 03:26 fedorov Status resolved => closed
2017-06-10 08:51 jcfr Changeset attached => Slicer master d897bddf