added patch fixing server certificate verification

Resolves: #995592
This commit is contained in:
Michal Minar 2013-08-09 21:02:29 +02:00
parent a4ad0fb52a
commit 7d2261779a
3 changed files with 18 additions and 5 deletions

4
.gitignore vendored
View File

@ -1,5 +1 @@
pywbem-0.7.0.tar.gz
/pywbem-20130128.tar.xz
/pywbem-20130411.tar.xz
/pywbem-20130702.tar.xz
/pywbem-20130723.tar.xz

View File

@ -0,0 +1,12 @@
Index: pywbem-20130723/cim_http.py
===================================================================
--- pywbem-20130723.orig/cim_http.py
+++ pywbem-20130723/cim_http.py
@@ -124,6 +124,7 @@ def wbem_request(url, data, creds, heade
from OpenSSL import SSL
ctx = SSL.Context(SSL.SSLv3_METHOD)
ctx.set_verify(SSL.VERIFY_PEER, verify_callback)
+ ctx.set_default_verify_paths()
# Add the key and certificate to the session
if cert_file is not None and key_file is not None:
ctx.use_certificate_file(cert_file)

View File

@ -4,7 +4,7 @@
Name: pywbem
Version: 0.7.0
Release: 14.%{revdate}svn%{svnrev}%{?dist}
Release: 15.%{revdate}svn%{svnrev}%{?dist}
Summary: Python WBEM Client and Provider Interface
Group: Development/Libraries
License: LGPLv2
@ -19,6 +19,7 @@ BuildArch: noarch
# fix module imports in /usr/bin/mofcomp
Patch0: pywbem-20130411-mof_compiler-import.patch
Patch1: pywbem-20130723-verify_certificate_paths.patch
%description
A Python library for making CIM (Common Information Model) operations over HTTP
@ -50,6 +51,7 @@ twisted.protocols.http.HTTPClient base class.
%prep
%setup -q -n %{name}-%{revdate}
%patch0 -p1 -b .mofcomp-imports
%patch1 -p1 -b .verify_certificate_paths
%build
# dirty workaround to fix the mof_compiler.py module path
@ -80,6 +82,9 @@ rm -rf %{buildroot}
%{python_sitelib}/pywbem/twisted_client.py*
%changelog
* Fri Aug 09 2013 Michal Minar <miminar@redhat.com> 0.7.0-15.20130723svn623
- Fixed certificate verification issue.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-14.20130723svn623
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild