aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/ssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-06-26 15:07:25 -1000
committerAlex Gaynor <alex.gaynor@gmail.com>2017-06-26 21:07:25 -0400
commitcaad666d34835265b9ebf9bb57d0ef53691c6388 (patch)
tree249f886dfaee1ca306322b560e432647ef871600 /src/_cffi_src/openssl/ssl.py
parentb867003543fca711f7c75b9050c30122dce14558 (diff)
downloadcryptography-caad666d34835265b9ebf9bb57d0ef53691c6388.tar.gz
cryptography-caad666d34835265b9ebf9bb57d0ef53691c6388.tar.bz2
cryptography-caad666d34835265b9ebf9bb57d0ef53691c6388.zip
bind DTLS 1.2 methods (#3725)
* bind DTLS 1.2 methods * remove version specific dtls bindings, rename sentinel value
Diffstat (limited to 'src/_cffi_src/openssl/ssl.py')
-rw-r--r--src/_cffi_src/openssl/ssl.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
index 48a8278c..99d67bb1 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
@@ -26,6 +26,7 @@ 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_DTLS;
+static const long Cryptography_HAS_GENERIC_DTLS_METHOD;
/* Internally invented symbol to tell us if SNI is supported */
static const long Cryptography_HAS_TLSEXT_HOSTNAME;
@@ -331,6 +332,11 @@ const SSL_METHOD *DTLSv1_method(void);
const SSL_METHOD *DTLSv1_server_method(void);
const SSL_METHOD *DTLSv1_client_method(void);
+/* Added in 1.0.2 */
+const SSL_METHOD *DTLS_method(void);
+const SSL_METHOD *DTLS_server_method(void);
+const SSL_METHOD *DTLS_client_method(void);
+
const SSL_METHOD *SSLv23_method(void);
const SSL_METHOD *SSLv23_server_method(void);
const SSL_METHOD *SSLv23_client_method(void);
@@ -590,6 +596,15 @@ static const long TLS_ST_BEFORE = 0;
static const long TLS_ST_OK = 0;
#endif
+#if defined(OPENSSL_NO_DTLS) || CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
+static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 0;
+const SSL_METHOD *(*DTLS_method)(void) = NULL;
+const SSL_METHOD *(*DTLS_server_method)(void) = NULL;
+const SSL_METHOD *(*DTLS_client_method)(void) = NULL;
+#else
+static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1;
+#endif
+
#ifndef OPENSSL_NO_DTLS
static const long Cryptography_HAS_DTLS = 1;
/* Wrap DTLSv1_get_timeout to avoid cffi to handle a 'struct timeval'. */