Author: Richard Plangger <[email protected]>
Branch: py3.5-ssl
Changeset: r88519:0665e64d865e
Date: 2016-11-21 12:26 +0100
http://bitbucket.org/pypy/pypy/changeset/0665e64d865e/
Log: remove part of two if statements that always will evaluate to False
(cryptography constraint)
diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -1133,7 +1133,8 @@
lib.EC_KEY_free(key)
def set_servername_callback(self, callback):
- if not HAS_SNI or lib.Cryptography_OPENSSL_NO_TLSEXT:
+ # cryptography constraint: OPENSSL_NO_TLSEXT will never be set!
+ if not HAS_SNI:
raise NotImplementedError("The TLS extension servername callback, "
"SSL_CTX_set_tlsext_servername_callback, "
"is not in the current OpenSSL library.")
@@ -1182,7 +1183,8 @@
-if HAS_SNI and not lib.Cryptography_OPENSSL_NO_TLSEXT:
+# cryptography constraint: OPENSSL_NO_TLSEXT will never be set!
+if HAS_SNI:
@ffi.callback("int(SSL*,int*,void*)")
def _servername_callback(s, al, arg):
scb = ffi.from_handle(arg)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit