diff --git a/volatility/framework/layers/resources.py b/volatility/framework/layers/resources.py index 6d6c90e6e..4e2f6808b 100644 --- a/volatility/framework/layers/resources.py +++ b/volatility/framework/layers/resources.py @@ -70,7 +70,11 @@ class ResourceAccessor(object): fp = urllib.request.urlopen(url, context = self._context) except error.URLError as excp: if excp.args: - if isinstance(excp.args[0], ssl.SSLCertVerificationError): + unverified_retrieval = (hasattr(ssl, "SSLCertVerificationError") and isinstance(excp.args[0], + ssl.SSLCertVerificationError)) or ( + isinstance(excp.args[0], ssl.SSLError) and excp.args[ + 0].reason == "CERTIFICATE_VERIFY_FAILED") + if unverified_retrieval: vollog.warning("SSL certificate verification failed: attempting UNVERIFIED retrieval") non_verifying_ctx = ssl.SSLContext() non_verifying_ctx.check_hostname = False