[Osgeo4w-trac] [osgeo4w] #715: ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
OSGeo4W
trac_osgeo4w at osgeo.org
Thu May 5 01:14:26 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 hellik):
Replying to [comment:7 andreaerdna]:
> Replying to [comment:5 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.
>
> >
> > Guess the fix for #696 cured this too.
>
>
> I cannot confirm the fixing of this bug.
> [...]
> With the Python console of QGIS 3.22.6 and 3.24.2, the following script:
>
> {{{
> import ssl
> import socket
> socketHandler = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> socketWraped = ssl.create_default_context().wrap_socket(socketHandler,
server_hostname='www.prgcloud.com')
> socketWraped.connect(('www.prgcloud.com', 443))
> }}}
>
> returns:
>
> {{{
> Traceback (most recent call last):
> File "C:\OSC726~1\apps\Python39\lib\code.py", line 90, in runcode
> exec(code, self.locals)
> File "<input>", line 1, in <module>
> File "C:\OSC726~1\apps\Python39\lib\ssl.py", line 1342, in connect
> self._real_connect(addr, False)
> File "C:\OSC726~1\apps\Python39\lib\ssl.py", line 1333, in
_real_connect
> self.do_handshake()
> File "C:\OSC726~1\apps\Python39\lib\ssl.py", line 1309, in
do_handshake
> self._sslobj.do_handshake()
> ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
> }}}
>
changing **www.prgcloud.com** to **www.osgeo.org**
in OSGeo4W Ver1
{{{
D:\wd\testmypa>python test2.py
D:\wd\testmypa>
}}}
and in OSGeo4W Ver2
{{{
run o-help for a list of available commands
C:\OSGeo4W>cd D:\wd\testmypa
C:\OSGeo4W>d:
D:\wd\testmypa>python test2.py
Traceback (most recent call last):
File "D:\wd\testmypa\test2.py", line 5, in <module>
socketWraped.connect(('www.osgeo.org', 443))
File "C:\OSGeo4W\apps\Python39\lib\ssl.py", line 1342, in connect
self._real_connect(addr, False)
File "C:\OSGeo4W\apps\Python39\lib\ssl.py", line 1333, in _real_connect
self.do_handshake()
File "C:\OSGeo4W\apps\Python39\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
}}}
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/715#comment:10>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the Osgeo4w-trac
mailing list