mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-09 00:50:58 +00:00
Fix error with SNI checks
This commit is contained in:
parent
a8623bc0bc
commit
dec0f6c8dc
3 changed files with 12 additions and 7 deletions
|
|
@ -14,7 +14,8 @@ Changes:
|
|||
- checking: Disable URL length warning for data: URLs.
|
||||
- checking: Do not warn about missing addresses on mailto links that have
|
||||
subjects.
|
||||
- checking: Display SSL certificate info even on redirects.
|
||||
- checking: Check and display SSL certificate info even on redirects.
|
||||
Closes: GH bug #489
|
||||
- installation: Check requirement for Python requests >= 2.2.0.
|
||||
Closes: GH bug #478
|
||||
- logging: Display downloaded bytes.
|
||||
|
|
@ -26,6 +27,8 @@ Fixes:
|
|||
- checking: Fix assertion in external link checking.
|
||||
- checking: Fix SSL errors on Windows.
|
||||
Closes: GH bug #471
|
||||
- checking: Fix error when SNI checks are enabled.
|
||||
Closes: GH bug #488
|
||||
- gui: Fix warning regex settings.
|
||||
Closes: GH bug #485
|
||||
|
||||
|
|
|
|||
|
|
@ -199,8 +199,9 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
"""Add SSL cipher info."""
|
||||
if self.scheme == u'https':
|
||||
sock = self._get_ssl_sock()
|
||||
self.ssl_cipher = sock.cipher()
|
||||
log.debug(LOG_CHECK, "Got SSL cipher %s", self.ssl_cipher)
|
||||
if hasattr(sock, 'cipher'):
|
||||
self.ssl_cipher = sock.cipher()
|
||||
log.debug(LOG_CHECK, "Got SSL cipher %s", self.ssl_cipher)
|
||||
self.ssl_cert = sock.getpeercert()
|
||||
log.debug(LOG_CHECK, "Got SSL certificate %s", self.ssl_cert)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -62,10 +62,11 @@ class SslCertificateCheck(_ConnectionPlugin):
|
|||
return
|
||||
self.checked_hosts.add(host)
|
||||
cert = url_data.ssl_cert
|
||||
cipher_name, ssl_protocol, num_secret_bits = url_data.ssl_cipher
|
||||
msg = _(u"SSL cipher %(cipher)s, %(protocol)s.")
|
||||
attrs = dict(cipher=cipher_name, protocol=ssl_protocol)
|
||||
url_data.add_info(msg % attrs)
|
||||
if url_data.ssl_cipher is not None:
|
||||
cipher_name, ssl_protocol, num_secret_bits = url_data.ssl_cipher
|
||||
msg = _(u"SSL cipher %(cipher)s, %(protocol)s.")
|
||||
attrs = dict(cipher=cipher_name, protocol=ssl_protocol)
|
||||
url_data.add_info(msg % attrs)
|
||||
config = url_data.aggregate.config
|
||||
if cert and 'notAfter' in cert:
|
||||
self.check_ssl_valid_date(url_data, cert)
|
||||
|
|
|
|||
Loading…
Reference in a new issue