aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-11-03 19:48:29 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2018-11-03 07:48:29 -0400
commitea34c1a9821545b99b6864af211dead662e75dfc (patch)
tree18b8bac25689f469c8df4af4239d735c0dd5581e /src/_cffi_src
parent95af1e391b7155ebffd962b58f0a2b213af33ec3 (diff)
downloadcryptography-ea34c1a9821545b99b6864af211dead662e75dfc.tar.gz
cryptography-ea34c1a9821545b99b6864af211dead662e75dfc.tar.bz2
cryptography-ea34c1a9821545b99b6864af211dead662e75dfc.zip
add various new TLS bindings (#4555)
* add SSL_OP_NO_TLSv1_3 * compiling now * bind SSL_CTX_set_ciphersuites as well * add some more
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/ssl.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
index f9481af1..e1880712 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
@@ -17,6 +17,7 @@ static const long Cryptography_HAS_SSL2;
static const long Cryptography_HAS_SSL3_METHOD;
static const long Cryptography_HAS_TLSv1_1;
static const long Cryptography_HAS_TLSv1_2;
+static const long Cryptography_HAS_TLSv1_3;
static const long Cryptography_HAS_SECURE_RENEGOTIATION;
static const long Cryptography_HAS_COMPRESSION;
static const long Cryptography_HAS_TLSEXT_STATUS_REQ_CB;
@@ -68,6 +69,7 @@ static const long SSL_OP_NO_SSLv3;
static const long SSL_OP_NO_TLSv1;
static const long SSL_OP_NO_TLSv1_1;
static const long SSL_OP_NO_TLSv1_2;
+static const long SSL_OP_NO_TLSv1_3;
static const long SSL_OP_NO_DTLSv1;
static const long SSL_OP_NO_DTLSv1_2;
static const long SSL_OP_NO_COMPRESSION;
@@ -100,6 +102,7 @@ static const long SSL_VERIFY_PEER;
static const long SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
static const long SSL_VERIFY_CLIENT_ONCE;
static const long SSL_VERIFY_NONE;
+static const long SSL_VERIFY_POST_HANDSHAKE;
static const long SSL_SESS_CACHE_OFF;
static const long SSL_SESS_CACHE_CLIENT;
static const long SSL_SESS_CACHE_SERVER;
@@ -529,6 +532,11 @@ int SSL_CTX_add_server_custom_ext(SSL_CTX *, unsigned int,
void *);
int SSL_extension_supported(unsigned int);
+
+int SSL_CTX_set_ciphersuites(SSL_CTX *, const char *);
+int SSL_verify_client_post_handshake(SSL *);
+void SSL_CTX_set_post_handshake_auth(SSL_CTX *, int);
+void SSL_set_post_handshake_auth(SSL *, int);
"""
CUSTOMIZATIONS = """
@@ -815,4 +823,15 @@ static const long Cryptography_HAS_CIPHER_DETAILS = 0;
static const long Cryptography_HAS_CIPHER_DETAILS = 1;
#endif
+#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111
+static const long Cryptography_HAS_TLSv1_3 = 0;
+static const long SSL_OP_NO_TLSv1_3 = 0;
+static const long SSL_VERIFY_POST_HANDSHAKE = 0;
+int (*SSL_CTX_set_ciphersuites)(SSL_CTX *, const char *) = NULL;
+int (*SSL_verify_client_post_handshake)(SSL *) = NULL;
+void (*SSL_CTX_set_post_handshake_auth)(SSL_CTX *, int) = NULL;
+void (*SSL_set_post_handshake_auth)(SSL *, int) = NULL;
+#else
+static const long Cryptography_HAS_TLSv1_3 = 1;
+#endif
"""