[python26-m2crypto/el5/master: 57/78] - Fix OpenSSL locking callback Resolves: #507903

gholms gholms at fedoraproject.org
Wed Feb 23 00:30:03 UTC 2011


commit 4169d1cca870dde2f471d0f2bdc36c3f59322f3a
Author: Miloslav Trmac <mitr at fedoraproject.org>
Date:   Wed Jun 24 17:55:31 2009 +0000

    - Fix OpenSSL locking callback Resolves: #507903

 m2crypto-0.19.1-locking.patch |   13 +++++++++++++
 m2crypto.spec                 |    9 ++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/m2crypto-0.19.1-locking.patch b/m2crypto-0.19.1-locking.patch
new file mode 100644
index 0000000..262174b
--- /dev/null
+++ b/m2crypto-0.19.1-locking.patch
@@ -0,0 +1,13 @@
+Index: SWIG/_threads.i
+===================================================================
+--- SWIG/_threads.i	(revision 686)
++++ SWIG/_threads.i	(working copy)
+@@ -14,7 +14,7 @@
+ void threading_locking_callback(int mode, int type, const char *file, int line) {
+ #ifdef THREADING
+         if (mode & CRYPTO_LOCK) {
+-                PyThread_acquire_lock(lock_cs[type], 0);
++                PyThread_acquire_lock(lock_cs[type], WAIT_LOCK);
+                 lock_count[type]++;
+         } else {
+                 PyThread_release_lock(lock_cs[type]);
diff --git a/m2crypto.spec b/m2crypto.spec
index 5df75c9..ec2d09a 100644
--- a/m2crypto.spec
+++ b/m2crypto.spec
@@ -6,7 +6,7 @@
 Summary: Support for using OpenSSL in python scripts
 Name: m2crypto
 Version: 0.19.1
-Release: 8
+Release: 9
 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
@@ -19,6 +19,8 @@ Patch2: m2crypto-0.19.1-close-HTTPResponse.patch
 Patch3: m2crypto-0.19.1-ssl-selector.patch
 # https://bugzilla.osafoundation.org/show_bug.cgi?id=9605
 Patch4: m2crypto-0.19.1-no-dns-in-altname.patch
+# https://bugzilla.osafoundation.org/show_bug.cgi?id=12847
+Patch5: m2crypto-0.19.1-locking.patch
 License: MIT
 Group: System Environment/Libraries
 URL: http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto
@@ -37,6 +39,7 @@ This package allows you to call OpenSSL functions from python scripts.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p0
+%patch5 -p0
 
 # Red Hat opensslconf.h #includes an architecture-specific file, but SWIG
 # doesn't follow the #include.
@@ -99,6 +102,10 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitearch}/M2Crypto-*.egg-info
 
 %changelog
+* Wed Jun 24 2009 Miloslav Trmač <mitr at redhat.com> - 0.19.1-9
+- Fix OpenSSL locking callback
+  Resolves: #507903
+
 * Wed Jun 10 2009 Miloslav Trmač <mitr at redhat.com> - 0.19.1-8
 - Don't reject certificates with subjectAltName that does not contain a dNSName
   Resolves: #504060


More information about the scm-commits mailing list