packages/lang/python/python/patches/011-fix-ssl-build-use-have-npn.patch
Rosen Penev 5d4f817865 python: Refresh patches
git is intollerant when it comes to fuzz. this fixes it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-03-08 18:48:45 -08:00

20 lines
732 B
Diff

--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1590,7 +1590,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
return PyUnicode_FromString(version);
}
-#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG)
+#if HAVE_NPN
static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) {
const unsigned char *out;
unsigned int outlen;
@@ -2118,7 +2118,7 @@ static PyMethodDef PySSLMethods[] = {
PySSL_peercert_doc},
{"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS},
{"version", (PyCFunction)PySSL_version, METH_NOARGS},
-#ifdef OPENSSL_NPN_NEGOTIATED
+#if HAVE_NPN
{"selected_npn_protocol", (PyCFunction)PySSL_selected_npn_protocol, METH_NOARGS},
#endif
#if HAVE_ALPN