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

hardcode the value of OpenSSL.SSL.OP_NO_TICKET for old version of openssl. Fixes #5689

parent d10322d4
No related branches found
No related tags found
No related merge requests found
......@@ -384,8 +384,13 @@ def _startSSL_pyOpenSSL(self):
else:
# See http://docs.python.org/dev/library/ssl.html
tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
tcpsock._sslContext.set_options(OpenSSL.SSL.OP_NO_SSLv2 | \
OpenSSL.SSL.OP_NO_TICKET)
flags = OpenSSL.SSL.OP_NO_SSLv2
try:
flags |= OpenSSL.SSL.OP_NO_TICKET
except AttributeError, e:
# py-OpenSSL < 0.9 or old OpenSSL
flags |= 16384
tcpsock._sslContext.set_options(flags)
tcpsock.ssl_errnum = 0
tcpsock._sslContext.set_verify(OpenSSL.SSL.VERIFY_PEER,
......
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