mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-09 19:27:39 +02:00
Fix: ssl error for python37
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user