[Python-checkins] cpython: Further compiling fixes (issue #17581)

antoine.pitrou python-checkins at python.org
Sat Mar 30 16:41:29 CET 2013


http://hg.python.org/cpython/rev/ad9effdc0ac3
changeset:   83023:ad9effdc0ac3
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Mar 30 16:36:54 2013 +0100
summary:
  Further compiling fixes (issue #17581)

files:
  Modules/_ssl.c |  5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1207,7 +1207,7 @@
 #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 @@
                     "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 @@
     {"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 */
 };
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list