]> khamidou — GitHub mirrors - imapclient.git/commitdiff
renamed ssl_default_context to get_default_context
authorMenno Smits <menno@freshfoo.com>
Fri, 23 Jan 2015 10:33:57 +0000 (23:33 +1300)
committerMenno Smits <menno@freshfoo.com>
Fri, 23 Jan 2015 10:33:57 +0000 (23:33 +1300)
imapclient/tls.py

index 25f346abda2a276af70ebf2b07cc5f5c4aaa32e0..ed1127cfa47c01700072e4588c4fe64063666260 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """STARTTLS support for imaplib for Python 2.6+ and 3.3+ built on pyOpenSSL."""
 
-__all__ = ('IMAP4', 'ssl_default_context')
+__all__ = ('IMAP4', 'get_default_context')
 
 import sys
 import imaplib
@@ -36,7 +36,7 @@ _RESTRICTED_SERVER_CIPHERS = (
 )
 
 
-def ssl_default_context(cafile=None, capath=None, check_hostname=True):
+def get_default_context(cafile=None, capath=None, check_hostname=True):
     """Create a SSL.Context object with reasonably secure default settings.
 
     This SSL context is configured only to be used for client connections, do
@@ -121,7 +121,7 @@ class IMAP4(imaplib.IMAP4):
             raise self.abort('STARTTLS not supported by server')
 
         if not ssl_context:
-            ssl_context = ssl_default_context()
+            ssl_context = get_default_context()
 
         type_, dat = self._simple_command(name)