summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-03-30 15:39:00 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-03-30 15:39:00 (GMT)
commita596338bb890aff7a2e611226f398fae5892dc66 (patch)
treeb7f3be6b3efe88221a4cc2934ed69664f33819df /Modules
parent41f8c4f5e46e52a7fc4a8921b64ded0a8a522f28 (diff)
downloadcpython-a596338bb890aff7a2e611226f398fae5892dc66.zip
cpython-a596338bb890aff7a2e611226f398fae5892dc66.tar.gz
cpython-a596338bb890aff7a2e611226f398fae5892dc66.tar.bz2
Fix previous fix (the cause was actually a misplaced #endif, or so it seems)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ssl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 57a598e..e69165b 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2499,6 +2499,7 @@ error:
#endif
return ret;
}
+#endif
PyDoc_STRVAR(PySSL_set_servername_callback_doc,
"set_servername_callback(method)\n\
@@ -2509,7 +2510,6 @@ the SSL/TLS client in the SNI extension.\n\
If the argument is None then the callback is disabled. The method is called\n\
with the SSLSocket, the server name as a string, and the SSLContext object.\n\
See RFC 6066 for details of the SNI");
-#endif
static PyObject *
set_servername_callback(PySSLContext *self, PyObject *args)
@@ -2575,10 +2575,8 @@ static struct PyMethodDef context_methods[] = {
{"set_ecdh_curve", (PyCFunction) set_ecdh_curve,
METH_O, NULL},
#endif
-#if HAVE_SNI && !defined(OPENSSL_NO_TLSEXT)
{"set_servername_callback", (PyCFunction) set_servername_callback,
METH_VARARGS, PySSL_set_servername_callback_doc},
-#endif
{NULL, NULL} /* sentinel */
};