summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-21 15:26:51 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-21 15:26:51 (GMT)
commit949ec14209c57e422b5bca092d0cebc8decc21a1 (patch)
tree604e0ab80dd09d5a7f79bc41ee07b30da7622c13 /Modules/_ssl.c
parenta282825bf6fae1f0d492df8a6ced15df4fa94222 (diff)
downloadcpython-949ec14209c57e422b5bca092d0cebc8decc21a1.zip
cpython-949ec14209c57e422b5bca092d0cebc8decc21a1.tar.gz
cpython-949ec14209c57e422b5bca092d0cebc8decc21a1.tar.bz2
Issue #19682: Fix compatibility issue with old version of OpenSSL that
was introduced by Issue #18379.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 8f3cc71..3a72530 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -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;
}