]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19682: Fix compatibility issue with old version of OpenSSL that
authorChristian Heimes <christian@cheimes.de>
Thu, 21 Nov 2013 15:26:51 +0000 (16:26 +0100)
committerChristian Heimes <christian@cheimes.de>
Thu, 21 Nov 2013 15:26:51 +0000 (16:26 +0100)
was introduced by Issue #18379.

Misc/NEWS
Modules/_ssl.c

index 0198630949867d1d50be727a15342724615ae607..d47cefd8244f37ffec90a97dc76f330380a7eb95 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -59,6 +59,9 @@ Core and Builtins
 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.
 
index 8f3cc71455b59840ebd6c7d1185d40d09f03147a..3a72530c37019b6c3abf4aa020e182f99daff15f 100644 (file)
@@ -1024,9 +1024,15 @@ _get_crl_dp(X509 *certificate) {
     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;
     }