From 87550626ff995ae61abf441e5e89076cc5a7dd45 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Tue, 23 Apr 2019 11:07:00 -0400 Subject: Use generic DTLS functions added in LibreSSL 2.9.1 (#4855) * Use generic DTLS functions added in LibreSSL 2.9.1 While here, bump travis. * Remove LibreSSL 2.9.0 from travis now that 2.9.1 exists. Requested by: @reaperhulk --- src/_cffi_src/openssl/ssl.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/_cffi_src/openssl/ssl.py') diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py index 92fd1e3e..da21f3ce 100644 --- a/src/_cffi_src/openssl/ssl.py +++ b/src/_cffi_src/openssl/ssl.py @@ -719,17 +719,20 @@ static const long TLS_ST_BEFORE = 0; static const long TLS_ST_OK = 0; #endif -#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 +/* LibreSSL 2.9.1 added only the DTLS_*_method functions */ +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && !CRYPTOGRAPHY_LIBRESSL_291_OR_GREATER 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 +#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 static const long SSL_OP_NO_DTLSv1 = 0; static const long SSL_OP_NO_DTLSv1_2 = 0; long (*DTLS_set_link_mtu)(SSL *, long) = NULL; long (*DTLS_get_link_min_mtu)(SSL *) = NULL; -#else -static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1; #endif static const long Cryptography_HAS_DTLS = 1; -- cgit v1.2.3