File tree 2 files changed +33
-0
lines changed 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 26
26
27
27
before_install :
28
28
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python; fi
29
+ - python scripts/ssl-check.py
29
30
- python -m pip install --disable-pip-version-check --upgrade pip
30
31
- pip install -U scikit-ci scikit-ci-addons
31
32
- ci_addons --install ../addons
Original file line number Diff line number Diff line change
1
+ # cf. https://github.com/pypa/manylinux/issues/53
2
+
3
+ GOOD_SSL = "https://google.com"
4
+ BAD_SSL = "https://self-signed.badssl.com"
5
+
6
+ import sys
7
+
8
+ print ("Testing SSL certificate checking for Python:" , sys .version )
9
+
10
+ if (sys .version_info [:2 ] < (3 , 4 )):
11
+ print ("This version never checks SSL certs; skipping tests" )
12
+ sys .exit (0 )
13
+
14
+ if sys .version_info [0 ] >= 3 :
15
+ from urllib .request import urlopen
16
+ EXC = OSError
17
+ else :
18
+ from urllib import urlopen
19
+ EXC = IOError
20
+
21
+ print ("Connecting to %s should work" % (GOOD_SSL ,))
22
+ urlopen (GOOD_SSL )
23
+ print ("...it did, yay." )
24
+
25
+ print ("Connecting to %s should fail" % (BAD_SSL ,))
26
+ try :
27
+ urlopen (BAD_SSL )
28
+ # If we get here then we failed:
29
+ print ("...it DIDN'T!!!!!11!!1one!" )
30
+ sys .exit (1 )
31
+ except EXC :
32
+ print ("...it did, yay." )
You can’t perform that action at this time.
0 commit comments