From 402424de9b4c7c8e0f42433061c1a1e88013218f Mon Sep 17 00:00:00 2001 From: Andreas Date: Fri, 12 May 2017 13:27:05 +0200 Subject: [PATCH] Fix incorrect include for mbedtls and version checking --- src/ssl.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ssl.h b/src/ssl.h index 3d40283..ab02a2d 100644 --- a/src/ssl.h +++ b/src/ssl.h @@ -89,20 +89,17 @@ int urandom_bytes(void *ctx, unsigned char *dest, size_t len); typedef ssl_context SSL_handle_t; #elif defined(USE_MBEDTLS) -#include -#if (MBEDTLS_VERSION_MINOR > 3) -#include -#else -#include -#endif #include -#if defined(MBEDTLS_VERSION_MAJOR) -#if (MBEDTLS_VERSION_MAJOR < 2) +#if !defined(MBEDTLS_VERSION_MAJOR) || (MBEDTLS_VERSION_MAJOR < 2) #error mbedTLS version 2.0.0 or greater is required! #endif + +#include +#if (MBEDTLS_VERSION_MINOR > 3) +#include #else -#error mbedTLS version 2.0.0 or greater is required! +#include #endif #if defined(USE_MBEDTLS_HAVEGE) -- 2.30.2