[osgeo4w-dev] [osgeo4w] #715: ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
OSGeo4W
trac_osgeo4w at osgeo.org
Wed May 4 10:05:04 PDT 2022
#715: ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
------------------------+----------------------------
Reporter: andreaerdna | Owner: osgeo4w-dev@…
Type: defect | Status: new
Priority: major | Component: Package
Version: | Resolution:
Keywords: |
------------------------+----------------------------
Comment (by jef):
Grmpf, tried the patch without success. `prgcloud.com` still fails. On a
closer look this is (meanwhile?) because its certificate is for
`www.prgcloud.com`. `www.prgcloud.com` and `www.python.org` work fine.
{{{
#!python
import ssl
import socket
import urllib.request
for i in ['prgcloud.com', 'www.prgcloud.com', '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}")
}}}
results in:
{{{
C:\OSGeo4W>python3 test.py
ssl prgcloud.com: FAIL A failure in the SSL library occurred (_ssl.c:1129)
urllib prgcloud.com: FAIL <urlopen error A failure in the SSL library
occurred (_ssl.c:1129)>
ssl www.prgcloud.com: OK
urllib www.prgcloud.com: OK
ssl www.python.org: OK
urllib www.python.org: OK
}}}
Guess the fix for #696 cured this too.
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/715#comment:5>
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