aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgesslerpd <gesslerpd@users.noreply.github.com>2018-01-16 09:07:23 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2018-01-16 09:07:23 -0600
commit5e866f7191cf307720811ac87364cd36e7fd990b (patch)
tree9bf615f9eb086abdce2d50e8b7512079e58c5e74
parent2beccafe22c87a7b3feb6672aaa88d7b7f3a9fb1 (diff)
downloadcryptography-5e866f7191cf307720811ac87364cd36e7fd990b.tar.gz
cryptography-5e866f7191cf307720811ac87364cd36e7fd990b.tar.bz2
cryptography-5e866f7191cf307720811ac87364cd36e7fd990b.zip
Add bindings for SSL_OP_NO_DTLS* (#4079)
* + bindings for SSL_OP_NO_DTLS* * + conditional for not HAS_GENERIC_DTLS_METHOD * flag SSL_OP_NO_DTLS* for unsupported deletion
-rw-r--r--.gitignore2
-rw-r--r--src/_cffi_src/openssl/ssl.py4
-rw-r--r--src/cryptography/hazmat/bindings/openssl/_conditional.py2
3 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 60f90063..cdc4b6ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,5 @@ htmlcov/
*.egg-info/
*.egg
.eggs/
-*.py[co]
+*.py[cdo]
.hypothesis/
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
index fdee30dd..7bfdc710 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
@@ -65,6 +65,8 @@ 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_DTLSv1;
+static const long SSL_OP_NO_DTLSv1_2;
static const long SSL_OP_NO_COMPRESSION;
static const long SSL_OP_SINGLE_DH_USE;
static const long SSL_OP_EPHEMERAL_RSA;
@@ -606,6 +608,8 @@ 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;
+static const long SSL_OP_NO_DTLSv1 = NULL;
+static const long SSL_OP_NO_DTLSv1_2 = NULL;
#else
static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1;
#endif
diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py
index b87ae906..8633373f 100644
--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py
+++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py
@@ -195,6 +195,8 @@ def cryptography_has_generic_dtls_method():
"DTLS_method",
"DTLS_server_method",
"DTLS_client_method",
+ "SSL_OP_NO_DTLSv1",
+ "SSL_OP_NO_DTLSv1_2",
]