Skip to content
Snippets Groups Projects
Commit 10449444 authored by steve-e's avatar steve-e
Browse files

Switch to SSL version 3 as the channel encryption protocol. As of...

Switch to SSL version 3 as the channel encryption protocol. As of http://docs.python.org/dev/library/ssl.html this is the maximally compatible SSL variant.
parent b0348386
No related branches found
No related tags found
No related merge requests found
......@@ -249,13 +249,12 @@ def __init__(self, cacerts, mycerts):
"SSL_CB_ALERT": 0x4000,
"SSL_CB_HANDSHAKE_START": 0x10, "SSL_CB_HANDSHAKE_DONE": 0x20}
def PlugIn(self, owner):
def plugin(self, owner):
'''
Use to PlugIn TLS into transport and start establishing immediately
Returns True if TLS/SSL was established correctly, otherwise False.
'''
log.info('Starting TLS estabilishing')
PlugIn.PlugIn(self, owner)
try:
res = self._startSSL()
except Exception, e:
......@@ -328,9 +327,8 @@ def _load_user_certs(self, cert_path, cert_store):
def _startSSL_pyOpenSSL(self):
log.debug("_startSSL_pyOpenSSL called")
tcpsock = self._owner
# FIXME: should method be configurable?
#tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD)
tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
# See http://docs.python.org/dev/library/ssl.html
tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv3_METHOD)
tcpsock.ssl_errnum = 0
tcpsock._sslContext.set_verify(OpenSSL.SSL.VERIFY_PEER,
self._ssl_verify_callback)
......
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