forked from pool/python
Update from application of this repo to SLE-12
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=271
This commit is contained in:
@@ -1,24 +1,21 @@
|
|||||||
Index: Python-2.7.9/Lib/ssl.py
|
--- a/Lib/ssl.py
|
||||||
===================================================================
|
+++ b/Lib/ssl.py
|
||||||
--- Python-2.7.9.orig/Lib/ssl.py 2015-08-12 15:53:27.419729448 +0200
|
@@ -495,7 +495,17 @@ def _get_https_context_factory():
|
||||||
+++ Python-2.7.9/Lib/ssl.py 2015-08-12 15:58:10.668465183 +0200
|
config_setting = os.environ.get(_https_verify_envvar)
|
||||||
@@ -469,7 +469,18 @@
|
if config_setting == '0':
|
||||||
return context
|
return _create_unverified_context
|
||||||
|
- return create_default_context
|
||||||
# Used by http.client if no context is explicitly passed.
|
|
||||||
-_create_default_https_context = create_default_context
|
|
||||||
+try:
|
|
||||||
+ # load the TLS checks policy from separate package
|
|
||||||
+ import sle_tls_checks_policy as policy
|
|
||||||
+ if policy.get_policy:
|
|
||||||
+ _create_default_https_context = policy.get_policy()
|
|
||||||
+ else:
|
|
||||||
+ # empty policy file means simply enable strict verification
|
|
||||||
+ _create_default_https_context = create_default_context
|
|
||||||
+
|
+
|
||||||
+except ImportError:
|
+ try:
|
||||||
+ # policy not present, disable verification for backwards compatibility
|
+ # load the TLS checks policy from separate package
|
||||||
+ _create_default_https_context = _create_unverified_context
|
+ import sle_tls_checks_policy as policy
|
||||||
|
+ if policy.get_policy:
|
||||||
|
+ return policy.get_policy()
|
||||||
|
+ else:
|
||||||
|
+ # empty policy file means simply enable strict verification
|
||||||
|
+ return create_default_context
|
||||||
|
+ except ImportError:
|
||||||
|
+ return create_default_context
|
||||||
|
|
||||||
|
_create_default_https_context = _get_https_context_factory()
|
||||||
|
|
||||||
# Backwards compatibility alias, even though it's not a public name.
|
|
||||||
|
@@ -88,7 +88,7 @@ Patch56: adapted-from-F00251-change-user-install-location.patch
|
|||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
%if %{suse_version} > 1200
|
%if %{suse_version} >= 1500
|
||||||
BuildRequires: libnsl-devel
|
BuildRequires: libnsl-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
|
@@ -94,7 +94,7 @@ BuildRequires: fdupes
|
|||||||
BuildRequires: gdbm-devel
|
BuildRequires: gdbm-devel
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
%if %{suse_version} > 1200
|
%if %{suse_version} >= 1500
|
||||||
BuildRequires: libnsl-devel
|
BuildRequires: libnsl-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: libopenssl-devel
|
BuildRequires: libopenssl-devel
|
||||||
|
Reference in New Issue
Block a user