From d2e85573d6bcdd23a9c719dacf182165bafa22c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 24 Jan 2019 10:48:19 -0500 Subject: Run wycheproof RSA tests on LibreSSL>=2.8 (#4737) * Run wycheproof RSA tests on LibreSSL>=2.8 * Define it this way * These are errors on libressl --- src/_cffi_src/openssl/cryptography.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/_cffi_src/openssl/cryptography.py') diff --git a/src/_cffi_src/openssl/cryptography.py b/src/_cffi_src/openssl/cryptography.py index e16fc57d..23ce87cf 100644 --- a/src/_cffi_src/openssl/cryptography.py +++ b/src/_cffi_src/openssl/cryptography.py @@ -33,8 +33,15 @@ INCLUDES = """ #include #endif +#if CRYPTOGRAPHY_IS_LIBRESSL #define CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER \ - (CRYPTOGRAPHY_IS_LIBRESSL && LIBRESSL_VERSION_NUMBER >= 0x2070000fL) + (LIBRESSL_VERSION_NUMBER >= 0x2070000f) +#define CRYPTOGRAPHY_LIBRESSL_28_OR_GREATER \ + (LIBRESSL_VERSION_NUMBER >= 0x2080000f) +#else +#define CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER (0) +#define CRYPTOGRAPHY_LIBRESSL_28_OR_GREATER (0) +#endif #define CRYPTOGRAPHY_OPENSSL_102_OR_GREATER \ (OPENSSL_VERSION_NUMBER >= 0x10002000 && !CRYPTOGRAPHY_IS_LIBRESSL) @@ -67,6 +74,8 @@ static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_102; static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_111; static const int CRYPTOGRAPHY_IS_LIBRESSL; + +static const int CRYPTOGRAPHY_LIBRESSL_28_OR_GREATER; """ FUNCTIONS = """ -- cgit v1.2.3