FreeBSD Bugzilla – Attachment 190606 Details for
Bug 225882
lang/python34: Unbreak with openssl-devel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
svn diff for lang/python34
patch-lang_python34-openssl-devel.txt (text/plain), 4.96 KB, created by
Bernard Spil
on 2018-02-14 11:02:18 UTC
(
hide
)
Description:
svn diff for lang/python34
Filename:
MIME Type:
Creator:
Bernard Spil
Created:
2018-02-14 11:02:18 UTC
Size:
4.96 KB
patch
obsolete
>Index: lang/python34/files/patch-issue30622 >=================================================================== >--- lang/python34/files/patch-issue30622 (nonexistent) >+++ lang/python34/files/patch-issue30622 (working copy) >@@ -0,0 +1,118 @@ >+From 7316c6d4a57931e9786c06eae168b227d7463317 Mon Sep 17 00:00:00 2001 >+From: Christian Heimes <christian@python.org> >+Date: Tue, 5 Sep 2017 16:00:44 +0200 >+Subject: [PATCH] [3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314) >+ >+* Change NPN detection: >+ >+Version breakdown, support disabled (pre-patch/post-patch): >+- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False >+- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined -> >+False/False >+- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and >+OPENSSL_NO_NEXTPROTONEG will be defined -> True/False >+ >+Version breakdown support enabled (pre-patch/post-patch): >+- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False >+- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and >+OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True >+- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and >+OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True >+ >+* Refine NPN guard: >+ >+- If NPN is disabled, but ALPN is available we need our callback >+- Make clinic's ssl behave the same way >+ >+This created a working ssl module for me, with NPN disabled and ALPN >+enabled for OpenSSL 1.1.0f. >+ >+Concerns to address: >+The initial commit for NPN support into OpenSSL [1], had the >+OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG >+guard. The question is if that ever made it into a release. >+This would need an ugly hack, something like: >+ >+ GH-if defined(OPENSSL_NO_NEXTPROTONEG) && \ >+ !defined(OPENSSL_NPN_NEGOTIATED) >+ GH- define OPENSSL_NPN_UNSUPPORTED 0 >+ GH- define OPENSSL_NPN_NEGOTIATED 1 >+ GH- define OPENSSL_NPN_NO_OVERLAP 2 >+ GH-endif >+ >+[1] https://github.com/openssl/openssl/commit/68b33cc5c7 >+(cherry picked from commit b2d096b) >+--- Modules/_ssl.c.orig 2018-02-14 11:30:08.028801000 +0100 >++++ Modules/_ssl.c 2018-02-14 11:33:36.577610000 +0100 >+@@ -207,7 +207,7 @@ static unsigned int _ssl_locks_count = 0 >+ typedef struct { >+ PyObject_HEAD >+ SSL_CTX *ctx; >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ char *npn_protocols; >+ int npn_protocols_len; >+ #endif >+@@ -1403,7 +1403,7 @@ static PyObject *PySSL_cipher (PySSLSock >+ return NULL; >+ } >+ >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) { >+ const unsigned char *out; >+ unsigned int outlen; >+@@ -1920,7 +1920,7 @@ static PyMethodDef PySSLMethods[] = { >+ {"peer_certificate", (PyCFunction)PySSL_peercert, METH_VARARGS, >+ PySSL_peercert_doc}, >+ {"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS}, >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ {"selected_npn_protocol", (PyCFunction)PySSL_selected_npn_protocol, METH_NOARGS}, >+ #endif >+ {"compression", (PyCFunction)PySSL_compression, METH_NOARGS}, >+@@ -2027,7 +2027,7 @@ context_new(PyTypeObject *type, PyObject >+ return NULL; >+ } >+ self->ctx = ctx; >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ self->npn_protocols = NULL; >+ #endif >+ #ifndef OPENSSL_NO_TLSEXT >+@@ -2099,7 +2099,7 @@ context_dealloc(PySSLContext *self) >+ { >+ context_clear(self); >+ SSL_CTX_free(self->ctx); >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ PyMem_Free(self->npn_protocols); >+ #endif >+ Py_TYPE(self)->tp_free(self); >+@@ -2126,7 +2126,7 @@ set_ciphers(PySSLContext *self, PyObject >+ Py_RETURN_NONE; >+ } >+ >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ /* this callback gets passed to SSL_CTX_set_next_protos_advertise_cb */ >+ static int >+ _advertiseNPN_cb(SSL *s, >+@@ -2175,7 +2175,7 @@ _selectNPN_cb(SSL *s, >+ static PyObject * >+ _set_npn_protocols(PySSLContext *self, PyObject *args) >+ { >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ Py_buffer protos; >+ >+ if (!PyArg_ParseTuple(args, "y*:set_npn_protocols", &protos)) >+@@ -4130,7 +4130,7 @@ PyInit__ssl(void) >+ Py_INCREF(r); >+ PyModule_AddObject(m, "HAS_ECDH", r); >+ >+-#ifdef OPENSSL_NPN_NEGOTIATED >++#if defined(OPENSSL_NPN_NEGOTIATED) && !defined(OPENSSL_NO_NEXTPROTONEG) >+ r = Py_True; >+ #else >+ r = Py_False; > >Property changes on: lang/python34/files/patch-issue30622 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 225882
: 190606