mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-31 13:10:37 +00:00
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
This commit is contained in:
parent
1e291afdfa
commit
bf45fb1884
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue