aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/ssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-19 14:24:44 +0800
committerDonald Stufft <donald@stufft.io>2016-11-19 01:24:44 -0500
commit47d3fcade37c76e1df7dd76d1e3425934853411e (patch)
treec4ab8bc8e17c537ac3ab106c1d737e8ac93cbc55 /src/_cffi_src/openssl/ssl.py
parent7db611785fdae1f9c31efba385ac44fe9deea86e (diff)
downloadcryptography-47d3fcade37c76e1df7dd76d1e3425934853411e.tar.gz
cryptography-47d3fcade37c76e1df7dd76d1e3425934853411e.tar.bz2
cryptography-47d3fcade37c76e1df7dd76d1e3425934853411e.zip
add OPENSSL_NPN_NEGOTIATED (#3252)
Diffstat (limited to 'src/_cffi_src/openssl/ssl.py')
-rw-r--r--src/_cffi_src/openssl/ssl.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
index db884b35..7565df18 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
@@ -25,6 +25,7 @@ static const long Cryptography_HAS_TLSEXT_STATUS_REQ_TYPE;
static const long Cryptography_HAS_GET_SERVER_TMP_KEY;
static const long Cryptography_HAS_SSL_CTX_SET_CLIENT_CERT_ENGINE;
static const long Cryptography_HAS_SSL_CTX_CLEAR_OPTIONS;
+static const long Cryptography_HAS_NPN_NEGOTIATED;
/* Internally invented symbol to tell us if SNI is supported */
static const long Cryptography_HAS_TLSEXT_HOSTNAME;
@@ -130,6 +131,8 @@ static const long SSL3_RANDOM_SIZE;
static const long TLS_ST_BEFORE;
static const long TLS_ST_OK;
+static const long OPENSSL_NPN_NEGOTIATED;
+
typedef ... SSL_METHOD;
typedef ... SSL_CTX;
@@ -703,4 +706,13 @@ static const long Cryptography_HAS_TLS_ST = 0;
static const long TLS_ST_BEFORE = 0;
static const long TLS_ST_OK = 0;
#endif
+
+/* This define is available in 1.0.1+ so we can remove this when we drop
+ support for 1.0.0 */
+#ifdef OPENSSL_NPN_NEGOTIATED
+static const long Cryptography_HAS_NPN_NEGOTIATED = 1;
+#else
+static const long OPENSSL_NPN_NEGOTIATED = -1;
+static const long Cryptography_HAS_NPN_NEGOTIATED = 0;
+#endif
"""