diff --git a/volatility3/framework/layers/resources.py b/volatility3/framework/layers/resources.py index dca215c85..4a3bd279a 100644 --- a/volatility3/framework/layers/resources.py +++ b/volatility3/framework/layers/resources.py @@ -120,11 +120,7 @@ class ResourceAccessor(object): fp = urllib.request.urlopen(url, context = self._context) except error.URLError as excp: if excp.args: - # TODO: As of python3.7 this can be removed - 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: + if isinstance(excp.args[0], ssl.SSLCertVerificationError): vollog.warning("SSL certificate verification failed: attempting UNVERIFIED retrieval") non_verifying_ctx = ssl.SSLContext() non_verifying_ctx.check_hostname = False