This commit is contained in:
Benjamin Peterson 2014-12-30 15:16:13 -06:00
commit bfdec6263f
2 changed files with 5 additions and 2 deletions

View file

@ -713,7 +713,7 @@ else:
'221 Goodbye.'
>>>
'''
ssl_version = ssl.PROTOCOL_TLSv1
ssl_version = ssl.PROTOCOL_SSLv23
def __init__(self, host='', user='', passwd='', acct='', keyfile=None,
certfile=None, context=None,
@ -743,7 +743,7 @@ else:
'''Set up secure control connection by using TLS/SSL.'''
if isinstance(self.sock, ssl.SSLSocket):
raise ValueError("Already using TLS")
if self.ssl_version == ssl.PROTOCOL_TLSv1:
if self.ssl_version >= ssl.PROTOCOL_SSLv23:
resp = self.voidcmd('AUTH TLS')
else:
resp = self.voidcmd('AUTH SSL')