Skip to content

Commit

Permalink
Add bindings for SSL_OP_NO_DTLS* (#4079)
Browse files Browse the repository at this point in the history
* + bindings for SSL_OP_NO_DTLS*

* + conditional for not HAS_GENERIC_DTLS_METHOD

* flag SSL_OP_NO_DTLS* for unsupported deletion
  • Loading branch information
gesslerpd authored and reaperhulk committed Jan 16, 2018
1 parent 2beccaf commit 5e866f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -10,5 +10,5 @@ htmlcov/
*.egg-info/
*.egg
.eggs/
*.py[co]
*.py[cdo]
.hypothesis/
4 changes: 4 additions & 0 deletions src/_cffi_src/openssl/ssl.py
Expand Up @@ -65,6 +65,8 @@
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;
Expand Down Expand Up @@ -606,6 +608,8 @@
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
Expand Down
2 changes: 2 additions & 0 deletions src/cryptography/hazmat/bindings/openssl/_conditional.py
Expand Up @@ -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",
]


Expand Down

0 comments on commit 5e866f7

Please sign in to comment.