[osgeo4w-dev] [osgeo4w] #715: ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
OSGeo4W
trac_osgeo4w at osgeo.org
Thu May 5 02:09:47 PDT 2022
#715: ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
------------------------+----------------------------
Reporter: andreaerdna | Owner: osgeo4w-dev@…
Type: defect | Status: closed
Priority: major | Component: Package
Version: | Resolution: fixed
Keywords: |
------------------------+----------------------------
Comment (by jef):
Odd:
{{{
import os
import ssl
import socket
import urllib.request
print(f"SSL_CERT_FILE:{os.getenv('SSL_CERT_FILE')}")
for i in ['www.osgeo.org', 'www.python.org']:
try:
socketHandler = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socketWrapped =
ssl.create_default_context().wrap_socket(socketHandler, server_hostname=i)
socketWrapped.connect((i, 443))
print(f"ssl {i}: OK")
except Exception as e:
print(f"ssl {i}: FAIL {e}")
try:
response = urllib.request.urlopen(f'https://{i}/')
html = response.read()
print(f"urllib {i}: OK")
except Exception as e:
print(f"urllib {i}: FAIL {e}")
}}}
python console, 3.24.2, Windows Sandbox (Windows 10 Version 2004),
shortcut:
{{{
SSL_CERT_FILE:None
ssl www.osgeo.org: OK
urllib www.osgeo.org: OK
ssl www.python.org: FAIL A failure in the SSL library occurred
(_ssl.c:1129)
urllib www.python.org: FAIL <urlopen error A failure in the SSL library
occurred (_ssl.c:1129)>
}}}
python console, 3.24.2, Windows Sandbox (Windows 10 Version 2004),
qgis.bat:
{{{
SSL_CERT_FILE:C:\OSGeo4W\bin\curl-ca-bundle.crt
ssl www.osgeo.org: OK
urllib www.osgeo.org: OK
ssl www.python.org: OK
urllib www.python.org: OK
}}}
python console, 3.24.2, Windows 10 Version 2009, qgis.bat:
{{{
SSL_CERT_FILE:D:\TEMP\OSC26D~1\bin\curl-ca-bundle.crt
ssl www.osgeo.org: OK
urllib www.osgeo.org: OK
ssl www.python.org: OK
urllib www.python.org: OK
}}}
python console, 3.24.2, Windows 10 Version 2009, shortcut:
{{{
SSL_CERT_FILE:None
ssl www.osgeo.org: OK
urllib www.osgeo.org: OK
ssl www.python.org: OK
urllib www.python.org: OK
}}}
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/715#comment:17>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the osgeo4w-dev
mailing list