Staging
v0.5.1
https://github.com/python/cpython
Revision 7316c6d4a57931e9786c06eae168b227d7463317 authored by Christian Heimes on 05 September 2017, 14:00:44 UTC, committed by GitHub on 05 September 2017, 14:00:44 UTC
* 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)
1 parent e2543a6
History
Tip revision: 7316c6d4a57931e9786c06eae168b227d7463317 authored by Christian Heimes on 05 September 2017, 14:00:44 UTC
[3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314)
Tip revision: 7316c6d
File Mode Size
_blake2
_ctypes
_decimal
_io
_multiprocessing
_sha3
_sqlite
cjkcodecs
clinic
expat
zlib
README -rw-r--r-- 112 bytes
Setup.config.in -rw-r--r-- 346 bytes
Setup.dist -rw-r--r-- 15.0 KB
_asynciomodule.c -rw-r--r-- 63.0 KB
_bisectmodule.c -rw-r--r-- 7.4 KB
_bz2module.c -rw-r--r-- 24.5 KB
_codecsmodule.c -rw-r--r-- 34.7 KB
_collectionsmodule.c -rw-r--r-- 72.7 KB
_cryptmodule.c -rw-r--r-- 1.4 KB
_csv.c -rw-r--r-- 50.1 KB
_curses_panel.c -rw-r--r-- 14.4 KB
_cursesmodule.c -rw-r--r-- 102.1 KB
_datetimemodule.c -rw-r--r-- 192.7 KB
_dbmmodule.c -rw-r--r-- 13.1 KB
_elementtree.c -rw-r--r-- 111.0 KB
_functoolsmodule.c -rw-r--r-- 37.1 KB
_gdbmmodule.c -rw-r--r-- 17.9 KB
_hashopenssl.c -rw-r--r-- 28.7 KB
_heapqmodule.c -rw-r--r-- 20.9 KB
_json.c -rw-r--r-- 60.0 KB
_localemodule.c -rw-r--r-- 16.7 KB
_lsprof.c -rw-r--r-- 26.9 KB
_lzmamodule.c -rw-r--r-- 46.8 KB
_math.c -rw-r--r-- 7.0 KB
_math.h -rw-r--r-- 995 bytes
_opcode.c -rw-r--r-- 1.7 KB
_operator.c -rw-r--r-- 38.3 KB
_pickle.c -rw-r--r-- 207.8 KB
_posixsubprocess.c -rw-r--r-- 25.9 KB
_randommodule.c -rw-r--r-- 16.5 KB
_scproxy.c -rw-r--r-- 5.9 KB
_sre.c -rw-r--r-- 79.7 KB
_ssl.c -rw-r--r-- 160.6 KB
_ssl_data.h -rw-r--r-- 67.9 KB
_stat.c -rw-r--r-- 15.4 KB
_struct.c -rw-r--r-- 64.9 KB
_testbuffer.c -rw-r--r-- 82.1 KB
_testcapimodule.c -rw-r--r-- 137.1 KB
_testimportmultiple.c -rw-r--r-- 1.1 KB
_testmultiphase.c -rw-r--r-- 16.1 KB
_threadmodule.c -rw-r--r-- 43.4 KB
_tkinter.c -rw-r--r-- 92.6 KB
_tracemalloc.c -rw-r--r-- 45.2 KB
_weakref.c -rw-r--r-- 4.4 KB
_winapi.c -rw-r--r-- 46.9 KB
addrinfo.h -rw-r--r-- 5.9 KB
ar_beos -rwxr-xr-x 1.8 KB
arraymodule.c -rw-r--r-- 85.7 KB
atexitmodule.c -rw-r--r-- 8.7 KB
audioop.c -rw-r--r-- 57.0 KB
binascii.c -rw-r--r-- 50.8 KB
cmathmodule.c -rw-r--r-- 42.3 KB
config.c.in -rw-r--r-- 1.6 KB
errnomodule.c -rw-r--r-- 28.1 KB
faulthandler.c -rw-r--r-- 37.8 KB
fcntlmodule.c -rw-r--r-- 18.8 KB
fpectlmodule.c -rw-r--r-- 9.9 KB
fpetestmodule.c -rw-r--r-- 5.7 KB
gc_weakref.txt -rw-r--r-- 11.2 KB
gcmodule.c -rw-r--r-- 57.1 KB
getaddrinfo.c -rw-r--r-- 18.4 KB
getbuildinfo.c -rw-r--r-- 1.3 KB
getnameinfo.c -rw-r--r-- 6.2 KB
getpath.c -rw-r--r-- 27.1 KB
grpmodule.c -rw-r--r-- 6.2 KB
hashlib.h -rw-r--r-- 2.2 KB
hashtable.c -rw-r--r-- 14.1 KB
hashtable.h -rw-r--r-- 6.2 KB
itertoolsmodule.c -rw-r--r-- 145.0 KB
ld_so_aix.in -rw-r--r-- 6.1 KB
ld_so_beos -rwxr-xr-x 1.8 KB
main.c -rw-r--r-- 25.2 KB
makesetup -rwxr-xr-x 7.3 KB
makexp_aix -rwxr-xr-x 3.2 KB
mathmodule.c -rw-r--r-- 67.7 KB
md5module.c -rw-r--r-- 15.0 KB
mmapmodule.c -rw-r--r-- 44.0 KB
nismodule.c -rw-r--r-- 11.6 KB
ossaudiodev.c -rw-r--r-- 36.3 KB
overlapped.c -rw-r--r-- 36.3 KB
parsermodule.c -rw-r--r-- 39.8 KB
posixmodule.c -rw-r--r-- 337.6 KB
posixmodule.h -rw-r--r-- 553 bytes
pwdmodule.c -rw-r--r-- 6.0 KB
pyexpat.c -rw-r--r-- 60.3 KB
readline.c -rw-r--r-- 38.1 KB
resource.c -rw-r--r-- 11.7 KB
rotatingtree.c -rw-r--r-- 3.4 KB
rotatingtree.h -rw-r--r-- 901 bytes
selectmodule.c -rw-r--r-- 75.6 KB
sha1module.c -rw-r--r-- 14.1 KB
sha256module.c -rw-r--r-- 22.2 KB
sha512module.c -rw-r--r-- 27.8 KB
signalmodule.c -rw-r--r-- 41.2 KB
socketmodule.c -rw-r--r-- 220.0 KB
socketmodule.h -rw-r--r-- 6.9 KB
spwdmodule.c -rw-r--r-- 5.9 KB
sre.h -rw-r--r-- 2.8 KB
sre_constants.h -rw-r--r-- 2.5 KB
sre_lib.h -rw-r--r-- 45.9 KB
symtablemodule.c -rw-r--r-- 2.6 KB
syslogmodule.c -rw-r--r-- 9.4 KB
termios.c -rw-r--r-- 20.4 KB
testcapi_long.h -rw-r--r-- 6.8 KB
timemodule.c -rw-r--r-- 42.1 KB
tkappinit.c -rw-r--r-- 4.7 KB
tkinter.h -rw-r--r-- 881 bytes
unicodedata.c -rw-r--r-- 40.7 KB
unicodedata_db.h -rw-r--r-- 509.1 KB
unicodename_db.h -rw-r--r-- 1.8 MB
winreparse.h -rw-r--r-- 1.4 KB
xxlimited.c -rw-r--r-- 6.9 KB
xxmodule.c -rw-r--r-- 12.1 KB
xxsubtype.c -rw-r--r-- 10.7 KB
zipimport.c -rw-r--r-- 47.2 KB
zlibmodule.c -rw-r--r-- 39.9 KB

README

back to top