- python-2.7.9-ssl_ca_path.patch - reintroduce support for CA directory path
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=174
This commit is contained in:
parent
9877de58c4
commit
3bc216a11c
21
python-2.7.9-ssl_ca_path.patch
Normal file
21
python-2.7.9-ssl_ca_path.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: Python-2.7.9/Lib/ssl.py
|
||||
===================================================================
|
||||
--- Python-2.7.9.orig/Lib/ssl.py 2014-12-10 16:59:40.000000000 +0100
|
||||
+++ Python-2.7.9/Lib/ssl.py 2015-02-25 17:28:19.538808314 +0100
|
||||
@@ -504,7 +504,15 @@
|
||||
self._context = SSLContext(ssl_version)
|
||||
self._context.verify_mode = cert_reqs
|
||||
if ca_certs:
|
||||
- self._context.load_verify_locations(ca_certs)
|
||||
+ capath = None
|
||||
+ cafile = None
|
||||
+ if os.path.isdir(ca_certs):
|
||||
+ capath = ca_certs
|
||||
+ else:
|
||||
+ cafile = ca_certs
|
||||
+ self._context.load_verify_locations(cafile=cafile, capath=capath)
|
||||
+ elif cert_reqs != CERT_NONE:
|
||||
+ self._context.set_default_verify_paths()
|
||||
if certfile:
|
||||
self._context.load_cert_chain(certfile, keyfile)
|
||||
if npn_protocols:
|
@ -52,6 +52,8 @@ Patch24: python-bsddb6.diff
|
||||
Patch31: python-2.7.7-mhlib-linkcount.patch
|
||||
# PATCH-FIX-UPSTREAM remove unconditional "import ssl" from test
|
||||
Patch32: python-2.7-urllib2-localnet-ssl.patch
|
||||
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
|
||||
Patch33: python-2.7.9-ssl_ca_path.patch
|
||||
# COMMON-PATCH-END
|
||||
%define python_version %(echo %{tarversion} | head -c 3)
|
||||
BuildRequires: automake
|
||||
@ -141,6 +143,7 @@ other applications.
|
||||
%patch24 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^version_required/dnl version_required/' configure.ac
|
||||
|
@ -52,6 +52,8 @@ Patch24: python-bsddb6.diff
|
||||
Patch31: python-2.7.7-mhlib-linkcount.patch
|
||||
# PATCH-FIX-UPSTREAM remove unconditional "import ssl" from test
|
||||
Patch32: python-2.7-urllib2-localnet-ssl.patch
|
||||
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
|
||||
Patch33: python-2.7.9-ssl_ca_path.patch
|
||||
# COMMON-PATCH-END
|
||||
Provides: pyth_doc
|
||||
Provides: pyth_ps
|
||||
@ -95,6 +97,7 @@ Python, and Macintosh Module Reference in PDF format.
|
||||
%patch24 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^version_required/dnl version_required/' configure.ac
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 25 16:31:37 UTC 2015 - jmatejek@suse.com
|
||||
|
||||
- python-2.7.9-ssl_ca_path.patch - reintroduce support for CA directory path
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 12 17:11:51 UTC 2014 - jmatejek@suse.com
|
||||
|
||||
|
@ -56,6 +56,8 @@ Patch24: python-bsddb6.diff
|
||||
Patch31: python-2.7.7-mhlib-linkcount.patch
|
||||
# PATCH-FIX-UPSTREAM remove unconditional "import ssl" from test
|
||||
Patch32: python-2.7-urllib2-localnet-ssl.patch
|
||||
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
|
||||
Patch33: python-2.7.9-ssl_ca_path.patch
|
||||
# COMMON-PATCH-END
|
||||
BuildRequires: automake
|
||||
BuildRequires: db-devel
|
||||
@ -175,6 +177,7 @@ implementation of the standard Unix DBM databases.
|
||||
%patch24 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^version_required/dnl version_required/' configure.ac
|
||||
|
Loading…
x
Reference in New Issue
Block a user