• Melvyn Sopacua's avatar
    bpo-30622: Change NPN detection: (#2079) · b2d096bd
    Melvyn Sopacua 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:
    
    	#if defined(OPENSSL_NO_NEXTPROTONEG) && \
    		!defined(OPENSSL_NPN_NEGOTIATED)
    	#	define OPENSSL_NPN_UNSUPPORTED 0
    	#	define OPENSSL_NPN_NEGOTIATED 1
    	#	define OPENSSL_NPN_NO_OVERLAP 2
    	#endif
    
    [1] https://github.com/openssl/openssl/commit/68b33cc5c7
    b2d096bd
Adı
Son kayıt (commit)
Son güncelleme
.github Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Programs Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README.rst Loading commit data...
aclocal.m4 Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...