]> granicus.if.org Git - python/commitdiff
ifdef our way to compatibility with old openssl (closes #23335)
authorBenjamin Peterson <benjamin@python.org>
Wed, 28 Jan 2015 17:06:39 +0000 (12:06 -0500)
committerBenjamin Peterson <benjamin@python.org>
Wed, 28 Jan 2015 17:06:39 +0000 (12:06 -0500)
Modules/_ssl.c

index 6a88e0c9dd41c554c9b93181cfb24373a193f650..9dc085922a78d3b87dc6f70939d2102bb58205d0 100644 (file)
@@ -2148,6 +2148,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,
@@ -2172,7 +2173,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,