From: hschang Date: Thu, 3 Dec 2015 02:07:20 +0000 (+0900) Subject: [python-2.7.9] fix 'SSL: CERTIFICATE_VERIFY_FAILED' X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_openvuplus_3.0;a=commitdiff_plain;h=50b04ec82f464fe02b47a4be53e873b6d463c8c5;ds=sidebyside [python-2.7.9] fix 'SSL: CERTIFICATE_VERIFY_FAILED' --- 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 index 0000000..fdba5e5 --- /dev/null +++ b/meta-openvuplus/recipes-devtools/python/python/urllib2_create_unverified_context.patch @@ -0,0 +1,18 @@ +commit 7ac30501e99ca139a20701f6b56be3eccacd8ea0 +Author: hschang +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: diff --git a/meta-openvuplus/recipes-devtools/python/python_2.7.9.bbappend b/meta-openvuplus/recipes-devtools/python/python_2.7.9.bbappend index 3a509a2..589acfb 100644 --- a/meta-openvuplus/recipes-devtools/python/python_2.7.9.bbappend +++ b/meta-openvuplus/recipes-devtools/python/python_2.7.9.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PR .= "-vuplus0" +PR .= "-vuplus1" 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://urllib2_create_unverified_context.patch \ " EXTRA_OECONF += " \