fix connection to openfire server using TLS. Fixes #5530

This commit is contained in:
Yann Leboulanger 2010-02-24 21:32:35 +01:00
parent 4287d26669
commit 7b0c54a606
1 changed files with 2 additions and 0 deletions

View File

@ -351,6 +351,8 @@ class NonBlockingTLS(PlugIn):
tcpsock = self._owner
# 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)
tcpsock.ssl_errnum = 0
tcpsock._sslContext.set_verify(OpenSSL.SSL.VERIFY_PEER,
self._ssl_verify_callback)