From 4d14fa1870841a36b2effab760bbaa52ac072d2a Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 23 Nov 2014 20:13:31 -0600 Subject: allow hostname to be passed to SSLContext even if OpenSSL doesn't support SNI (closes #22921) Patch from Donald Stufft. --- Modules/_ssl.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'Modules/_ssl.c') diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 1638ebe3b6..8ee8c3d149 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2824,12 +2824,6 @@ context_wrap_socket(PySSLContext *self, PyObject *args, PyObject *kwds) &sock, &server_side, "idna", &hostname, &ssl_sock)) return NULL; -#if !HAVE_SNI - PyMem_Free(hostname); - PyErr_SetString(PyExc_ValueError, "server_hostname is not supported " - "by your OpenSSL library"); - return NULL; -#endif } res = (PyObject *) newPySSLSocket(self, sock, server_side, -- cgit v1.2.1