diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index f8f899c7..c1579ed7 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -163,20 +163,14 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport): allow_redirects=False, ) if self.scheme == u"https" and self.aggregate.config["sslverify"]: - kwargs["verify"] = self.aggregate.config["sslverify"] - log.debug(LOG_CHECK, "Send request with %s", kwargs) - try: - self._send_request(request, **kwargs) - except requests.exceptions.SSLError: - # provide non-validated connection info - del kwargs["verify"] - self._send_request(request, **kwargs) - raise + kwargs['verify'] = self.aggregate.config["sslverify"] else: - self._send_request(request, **kwargs) + kwargs['verify'] = False + self._send_request(request, **kwargs) def _send_request(self, request, **kwargs): """Send GET request.""" + log.debug(LOG_CHECK, "Send request with %s", kwargs) self.url_connection = self.session.send(request, **kwargs) self.headers = self.url_connection.headers if self.scheme == u'https': diff --git a/linkcheck/plugins/sslcertcheck.py b/linkcheck/plugins/sslcertcheck.py index 505210b3..f2187acf 100644 --- a/linkcheck/plugins/sslcertcheck.py +++ b/linkcheck/plugins/sslcertcheck.py @@ -91,6 +91,10 @@ class SslCertificateCheck(_ConnectionPlugin): strTimeValid = strformat.strduration_long(secondsValid) msg = _('SSL certificate is only %s valid') % strTimeValid url_data.add_warning(msg) + else: + strTimeValid = strformat.strduration_long(secondsValid) + msg = _('SSL certificate is %s valid') % strTimeValid + url_data.add_info(msg) @classmethod def read_config(cls, configparser):