rpms/m2crypto/devel m2crypto-0.20.2-check.patch, NONE, 1.1 m2crypto.spec, 1.66, 1.67

Miloslav Trmac mitr at fedoraproject.org
Thu Jul 8 22:35:28 UTC 2010


Author: mitr

Update of /cvs/pkgs/rpms/m2crypto/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4614

Modified Files:
	m2crypto.spec 
Added Files:
	m2crypto-0.20.2-check.patch 
Log Message:
* Fri Jul  9 2010 Miloslav Trmač <mitr at redhat.com> - 0.20.2-8
- Allow overriding SSL.Connection.postConnectionCheck from m2urllib2
  Resolves: #610906


m2crypto-0.20.2-check.patch:
 Connection.py |    4 ++++
 Context.py    |    4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

--- NEW FILE m2crypto-0.20.2-check.patch ---
diff -up M2Crypto-0.20.2/M2Crypto/SSL/Connection.py.check M2Crypto-0.20.2/M2Crypto/SSL/Connection.py
--- M2Crypto-0.20.2/M2Crypto/SSL/Connection.py.check	2010-07-09 00:05:56.000000000 +0200
+++ M2Crypto-0.20.2/M2Crypto/SSL/Connection.py	2010-07-09 00:08:20.677169899 +0200
@@ -54,6 +54,10 @@ class Connection:
 
         self.ssl_close_flag = m2.bio_noclose
 
+        if self.ctx.post_connection_check is not None:
+            self.set_post_connection_check_callback \
+                (self.ctx.post_connection_check)
+
         
     def __del__(self):
         if getattr(self, 'sslbio', None):
diff -up M2Crypto-0.20.2/M2Crypto/SSL/Context.py.check M2Crypto-0.20.2/M2Crypto/SSL/Context.py
--- M2Crypto-0.20.2/M2Crypto/SSL/Context.py.check	2009-10-07 06:24:28.000000000 +0200
+++ M2Crypto-0.20.2/M2Crypto/SSL/Context.py	2010-07-09 00:06:47.551169489 +0200
@@ -36,12 +36,14 @@ class Context:
 
     m2_ssl_ctx_free = m2.ssl_ctx_free
 
-    def __init__(self, protocol='sslv23', weak_crypto=None):
+    def __init__(self, protocol='sslv23', weak_crypto=None,
+                 post_connection_check=None):
         proto = getattr(m2, protocol + '_method', None)
         if proto is None:
             raise ValueError, "no such protocol '%s'" % protocol
         self.ctx = m2.ssl_ctx_new(proto())
         self.allow_unknown_ca = 0
+        self.post_connection_check = post_connection_check
         map()[long(self.ctx)] = self
         m2.ssl_ctx_set_cache_size(self.ctx, 128L)
         if weak_crypto is None:


Index: m2crypto.spec
===================================================================
RCS file: /cvs/pkgs/rpms/m2crypto/devel/m2crypto.spec,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -p -r1.66 -r1.67
--- m2crypto.spec	19 May 2010 05:39:30 -0000	1.66
+++ m2crypto.spec	8 Jul 2010 22:35:27 -0000	1.67
@@ -6,7 +6,7 @@
 Summary: Support for using OpenSSL in python scripts
 Name: m2crypto
 Version: 0.20.2
-Release: 7%{?dist}
+Release: 8%{?dist}
 Source0: http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
 # https://bugzilla.osafoundation.org/show_bug.cgi?id=2341
 Patch0: m2crypto-0.18-timeouts.patch
@@ -20,6 +20,8 @@ Patch3: m2crypto-0.20.2-threads.patch
 Patch4: m2crypto-0.20.2-testsuite.patch
 # https://bugzilla.osafoundation.org/show_bug.cgi?id=12972
 Patch5: m2crypto-0.20.2-fips.patch
+# https://bugzilla.osafoundation.org/show_bug.cgi?id=12973
+Patch6: m2crypto-0.20.2-check.patch
 License: MIT
 Group: System Environment/Libraries
 URL: http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto
@@ -40,6 +42,7 @@ This package allows you to call OpenSSL 
 %patch3 -p1 -b .threads
 %patch4 -p0 -b .testsuite
 %patch5 -p1 -b .fips
+%patch6 -p1 -b .check
 
 # Red Hat opensslconf.h #includes an architecture-specific file, but SWIG
 # doesn't follow the #include.
@@ -106,6 +109,10 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitearch}/M2Crypto-*.egg-info
 
 %changelog
+* Fri Jul  9 2010 Miloslav Trmač <mitr at redhat.com> - 0.20.2-8
+- Allow overriding SSL.Connection.postConnectionCheck from m2urllib2
+  Resolves: #610906
+
 * Wed May 19 2010 Miloslav Trmač <mitr at redhat.com> - 0.20.2-7
 - Make test suite pass in FIPS mode
   Resolves: #565662



More information about the scm-commits mailing list