summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-01-28 17:06:39 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-01-28 17:06:39 (GMT)
commitc54de477595a09e4e40497738882212c374f0227 (patch)
tree02b348a3bd6722a86519c5f65d1a68bb379aef28
parentaaef05f003b11b3679e0d05ab633329fb5579e83 (diff)
downloadcpython-c54de477595a09e4e40497738882212c374f0227.zip
cpython-c54de477595a09e4e40497738882212c374f0227.tar.gz
cpython-c54de477595a09e4e40497738882212c374f0227.tar.bz2
ifdef our way to compatibility with old openssl (closes #23335)
-rw-r--r--Modules/_ssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 3faca0a..437d2b2 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2275,6 +2275,7 @@ set_ciphers(PySSLContext *self, PyObject *args)
Py_RETURN_NONE;
}
+#ifdef OPENSSL_NPN_NEGOTIATED
static int
do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen,
const unsigned char *server_protocols, unsigned int server_protocols_len,
@@ -2299,7 +2300,6 @@ do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen,
return SSL_TLSEXT_ERR_OK;
}
-#ifdef OPENSSL_NPN_NEGOTIATED
/* this callback gets passed to SSL_CTX_set_next_protos_advertise_cb */
static int
_advertiseNPN_cb(SSL *s,