-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expose a few more OpenSSL functions that are useful for DTLS support #6138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
585605d
c7f3d4d
60fd092
8278a69
e919764
1028b7d
ad45530
ae8ed2d
1a31c42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| * supported | ||
| */ | ||
| static const long Cryptography_HAS_OP_NO_COMPRESSION; | ||
| static const long Cryptography_HAS_OP_NO_RENEGOTIATION; | ||
| static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING; | ||
| static const long Cryptography_HAS_SSL_SET_SSL_CTX; | ||
| static const long Cryptography_HAS_SSL_OP_NO_TICKET; | ||
|
|
@@ -43,6 +44,7 @@ | |
| static const long Cryptography_HAS_SET_CERT_CB; | ||
| static const long Cryptography_HAS_CUSTOM_EXT; | ||
| static const long Cryptography_HAS_SRTP; | ||
| static const long Cryptography_HAS_DTLS_GET_DATA_MTU; | ||
|
|
||
| static const long SSL_FILETYPE_PEM; | ||
| static const long SSL_FILETYPE_ASN1; | ||
|
|
@@ -64,6 +66,7 @@ | |
| 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_RENEGOTIATION; | ||
| static const long SSL_OP_NO_COMPRESSION; | ||
| static const long SSL_OP_SINGLE_DH_USE; | ||
| static const long SSL_OP_EPHEMERAL_RSA; | ||
|
|
@@ -225,6 +228,13 @@ | |
| unsigned char *, | ||
| unsigned int * | ||
| )); | ||
| void SSL_CTX_set_cookie_verify_cb(SSL_CTX *, | ||
| int (*)( | ||
| SSL *, | ||
| const unsigned char *, | ||
| unsigned int | ||
| )); | ||
|
|
||
| long SSL_CTX_get_read_ahead(SSL_CTX *); | ||
| long SSL_CTX_set_read_ahead(SSL_CTX *, long); | ||
|
|
||
|
|
@@ -468,6 +478,10 @@ | |
| long DTLSv1_handle_timeout(SSL *); | ||
| long DTLS_set_link_mtu(SSL *, long); | ||
| long DTLS_get_link_min_mtu(SSL *); | ||
| long SSL_set_mtu(SSL *, long); | ||
| int DTLSv1_listen(SSL *, BIO_ADDR *); | ||
| size_t DTLS_get_data_mtu(SSL *); | ||
|
|
||
|
|
||
| /* Custom extensions. */ | ||
| typedef int (*custom_ext_add_cb)(SSL *, unsigned int, | ||
|
|
@@ -556,6 +570,13 @@ | |
| static const long Cryptography_HAS_NEXTPROTONEG = 0; | ||
| static const long Cryptography_HAS_ALPN = 1; | ||
|
|
||
| #ifdef SSL_OP_NO_RENEGOTIATION | ||
| static const long Cryptography_HAS_OP_NO_RENEGOTIATION = 1; | ||
| #else | ||
| static const long Cryptography_HAS_OP_NO_RENEGOTIATION = 0; | ||
| static const long SSL_OP_NO_RENEGOTIATION = 0; | ||
| #endif | ||
|
|
||
| #if CRYPTOGRAPHY_IS_LIBRESSL | ||
| void (*SSL_CTX_set_cert_cb)(SSL_CTX *, int (*)(SSL *, void *), void *) = NULL; | ||
| void (*SSL_set_cert_cb)(SSL *, int (*)(SSL *, void *), void *) = NULL; | ||
|
|
@@ -594,6 +615,13 @@ | |
| long (*DTLS_get_link_min_mtu)(SSL *) = NULL; | ||
| #endif | ||
|
|
||
| #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 | ||
| static const long Cryptography_HAS_DTLS_GET_DATA_MTU = 0; | ||
| size_t (*DTLS_get_data_mtu)(SSL *) = NULL; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Take a look in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like currently,
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha, I would argue that is a bug (we don't want callables that are null func ptrs!). Looks like that's a thing we need to separately fix for the DTLS bindings though... |
||
| #else | ||
| static const long Cryptography_HAS_DTLS_GET_DATA_MTU = 1; | ||
| #endif | ||
|
|
||
| static const long Cryptography_HAS_DTLS = 1; | ||
| /* Wrap DTLSv1_get_timeout to avoid cffi to handle a 'struct timeval'. */ | ||
| long Cryptography_DTLSv1_get_timeout(SSL *ssl, time_t *ptv_sec, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.