[Python-checkins] cpython: Issue #19682: Fix compatibility issue with old version of OpenSSL that

christian.heimes python-checkins at python.org
Thu Nov 21 16:27:43 CET 2013


http://hg.python.org/cpython/rev/40bfddda43d4
changeset:   87311:40bfddda43d4
parent:      87307:eec4758e3a45
user:        Christian Heimes <christian at cheimes.de>
date:        Thu Nov 21 16:26:51 2013 +0100
summary:
  Issue #19682: Fix compatibility issue with old version of OpenSSL that
was introduced by Issue #18379.

files:
  Misc/NEWS      |  3 +++
  Modules/_ssl.c |  6 ++++++
  2 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -59,6 +59,9 @@
 Library
 -------
 
+- Issue #19682: Fix compatibility issue with old version of OpenSSL that
+  was introduced by Issue #18379.
+
 - Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
   big-endian platforms.
 
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1024,9 +1024,15 @@
     int i, j, result;
     PyObject *lst;
 
+#if OPENSSL_VERSION_NUMBER < 0x10001000L
+    dps = X509_get_ext_d2i(certificate, NID_crl_distribution_points,
+                           NULL, NULL);
+#else
     /* Calls x509v3_cache_extensions and sets up crldp */
     X509_check_ca(certificate);
     dps = certificate->crldp;
+#endif
+
     if (dps == NULL) {
         return Py_None;
     }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list