Skip to content
Snippets Groups Projects
Commit 692d3db4 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

do TLS handshake without blocking.

parent 374d4684
No related branches found
No related tags found
No related merge requests found
......@@ -418,13 +418,13 @@ def _startSSL_pyOpenSSL(self):
tcpsock._send = wrapper.send
log.debug("Initiating handshake...")
tcpsock._sslObj.setblocking(True)
try:
tcpsock._sslObj.do_handshake()
except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError), e:
pass
except:
log.error('Error while TLS handshake: ', exc_info=True)
return False
tcpsock._sslObj.setblocking(False)
self._owner.ssl_lib = PYOPENSSL
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment