From 46d96d0aa0e39dcde389150767e1ae51b357cb81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Thu, 19 May 2016 14:49:55 -0400 Subject: [PATCH] fix HTTPS URL checks in Debian Jessie, linkchecker fails because of an API problem. it completely breaks HTTPs checks. this patch fixes the problem from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772947 --- linkcheck/httputil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/httputil.py b/linkcheck/httputil.py index d59a0623..30d1c0c8 100644 --- a/linkcheck/httputil.py +++ b/linkcheck/httputil.py @@ -32,14 +32,14 @@ def x509_to_dict(x509): """Parse a x509 pyopenssl object to a dictionary with keys subject, subjectAltName and optional notAfter. """ - from requests.packages.urllib3.contrib.pyopenssl import get_subj_alt_name + import requests.packages.urllib3.contrib.pyopenssl as SSL res = { 'subject': ( (('commonName', x509.get_subject().CN),), ), 'subjectAltName': [ ('DNS', value) - for value in get_subj_alt_name(x509) + for value in SSL.get_subj_alt_name(x509) ] } notAfter = x509.get_notAfter()