• Christian Heimes's avatar
    [3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314) · 7316c6d4
    Christian Heimes yazdı
    * 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 b2d096bd)
    7316c6d4
Adı
Son kayıt (commit)
Son güncelleme
..
_asynciomodule.c.h Loading commit data...
_bz2module.c.h Loading commit data...
_codecsmodule.c.h Loading commit data...
_cryptmodule.c.h Loading commit data...
_cursesmodule.c.h Loading commit data...
_datetimemodule.c.h Loading commit data...
_dbmmodule.c.h Loading commit data...
_elementtree.c.h Loading commit data...
_gdbmmodule.c.h Loading commit data...
_hashopenssl.c.h Loading commit data...
_lzmamodule.c.h Loading commit data...
_opcode.c.h Loading commit data...
_pickle.c.h Loading commit data...
_sre.c.h Loading commit data...
_ssl.c.h Loading commit data...
_tkinter.c.h Loading commit data...
_weakref.c.h Loading commit data...
_winapi.c.h Loading commit data...
arraymodule.c.h Loading commit data...
audioop.c.h Loading commit data...
binascii.c.h Loading commit data...
cmathmodule.c.h Loading commit data...
fcntlmodule.c.h Loading commit data...
grpmodule.c.h Loading commit data...
md5module.c.h Loading commit data...
posixmodule.c.h Loading commit data...
pwdmodule.c.h Loading commit data...
pyexpat.c.h Loading commit data...
sha1module.c.h Loading commit data...
sha256module.c.h Loading commit data...
sha512module.c.h Loading commit data...
signalmodule.c.h Loading commit data...
spwdmodule.c.h Loading commit data...
unicodedata.c.h Loading commit data...
zlibmodule.c.h Loading commit data...