don't require OpenSSL SNI to pass hostname to ssl functions (#22921)

Patch by Donald Stufft.
This commit is contained in:
Benjamin Peterson 2014-11-23 17:04:34 -06:00
parent 378e15d7ab
commit 7243b574e5
16 changed files with 22 additions and 67 deletions

View file

@ -18,9 +18,6 @@ try:
import ssl
except ImportError:
ssl = None
HAS_SNI = False
else:
from ssl import HAS_SNI
CERTFILE = None
CAFILE = None
@ -352,7 +349,6 @@ class ThreadedNetworkedTestsSSL(BaseThreadedNetworkedTests):
imap_class = IMAP4_SSL
@reap_threads
@unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
def test_ssl_verified(self):
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ssl_context.verify_mode = ssl.CERT_REQUIRED