diff --git a/Misc/NEWS.d/next/Build/2018-11-16-15-19-09.bpo-35264.h5GxH3.rst b/Misc/NEWS.d/next/Build/2018-11-16-15-19-09.bpo-35264.h5GxH3.rst new file mode 100644 index 00000000000000..d17968a52debf4 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2018-11-16-15-19-09.bpo-35264.h5GxH3.rst @@ -0,0 +1 @@ +Fix SSL module build with OpenSSL 1.1.0 diff --git a/Modules/_ssl.c b/Modules/_ssl.c index a96c41926036cc..c80437eef78fbf 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -1586,7 +1586,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; @@ -2114,7 +2114,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