[python-2.7.9] fix 'SSL: CERTIFICATE_VERIFY_FAILED'
authorhschang <chang@dev3>
Thu, 3 Dec 2015 02:07:20 +0000 (11:07 +0900)
committerhschang <chang@dev3>
Thu, 3 Dec 2015 02:07:20 +0000 (11:07 +0900)
meta-openvuplus/recipes-devtools/python/python/urllib2_create_unverified_context.patch [new file with mode: 0644]
meta-openvuplus/recipes-devtools/python/python_2.7.9.bbappend

diff --git a/meta-openvuplus/recipes-devtools/python/python/urllib2_create_unverified_context.patch b/meta-openvuplus/recipes-devtools/python/python/urllib2_create_unverified_context.patch
new file mode 100644 (file)
index 0000000..fdba5e5
--- /dev/null
@@ -0,0 +1,18 @@
+commit 7ac30501e99ca139a20701f6b56be3eccacd8ea0
+Author: hschang <chang@dev3>
+Date:   Thu Dec 3 11:03:41 2015 +0900
+
+    [urllib2] Handle target environment that doesn't support HTTPS verification.
+
+diff --git a/Lib/urllib2.py b/Lib/urllib2.py
+index 9277b1d..24e7ada 100644
+--- a/Lib/urllib2.py
++++ b/Lib/urllib2.py
+@@ -112,6 +112,7 @@ except ImportError:
+ # check for SSL
+ try:
+     import ssl
++    ssl._create_default_https_context = ssl._create_unverified_context
+ except ImportError:
+     _have_ssl = False
+ else:
index 3a509a2..589acfb 100644 (file)
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-PR .= "-vuplus0"
+PR .= "-vuplus1"
 
 SRC_URI += " \
         file://no-ldconfig.patch \
 
 SRC_URI += " \
         file://no-ldconfig.patch \
@@ -8,6 +8,7 @@ SRC_URI += " \
         file://04-default-is-optimized.patch \
         file://99-ignore-optimization-flag.patch \
        file://pgettext.patch \
         file://04-default-is-optimized.patch \
         file://99-ignore-optimization-flag.patch \
        file://pgettext.patch \
+       file://urllib2_create_unverified_context.patch \
 "
 
 EXTRA_OECONF += " \
 "
 
 EXTRA_OECONF += " \