diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-03-30 15:36:54 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-03-30 15:36:54 (GMT) |
commit | 41f8c4f5e46e52a7fc4a8921b64ded0a8a522f28 (patch) | |
tree | 33a2b3df43ca84bbdbe64ce6e64ad956d07fc9ae /Modules/_ssl.c | |
parent | 9498839a1a29205d65c798a3a6bca272430b83c1 (diff) | |
download | cpython-41f8c4f5e46e52a7fc4a8921b64ded0a8a522f28.zip cpython-41f8c4f5e46e52a7fc4a8921b64ded0a8a522f28.tar.gz cpython-41f8c4f5e46e52a7fc4a8921b64ded0a8a522f28.tar.bz2 |
Further compiling fixes (issue #17581)
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index bcabd67..57a598e 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -1207,7 +1207,7 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value, #if !HAVE_SNI PyErr_SetString(PyExc_NotImplementedError, "setting a socket's " "context is not supported by your OpenSSL library"); - return NULL; + return -1; #else Py_INCREF(value); Py_DECREF(self->ctx); @@ -2542,6 +2542,7 @@ set_servername_callback(PySSLContext *self, PyObject *args) "The TLS extension servername callback, " "SSL_CTX_set_tlsext_servername_callback, " "is not in the current OpenSSL library."); + return NULL; #endif } @@ -2574,8 +2575,10 @@ 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 */ }; |