From 4584cc44996c2db82542f0e702aee4a6ce5dcb18 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Wed, 16 May 2018 02:02:29 -0400 Subject: schannel: disable manual verify if APIs not available .. because original MinGW and old compilers do not have the Windows API definitions needed to support manual verification. --- lib/vtls/schannel.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/vtls/schannel.h') diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index 447690027..aa44e8e89 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -38,6 +38,19 @@ CURLcode verify_certificate(struct connectdata *conn, int sockindex); /* structs to expose only in schannel.c and schannel_verify.c */ #ifdef EXPOSE_SCHANNEL_INTERNAL_STRUCTS + +#ifdef __MINGW32__ +#include <_mingw.h> +#ifdef __MINGW64_VERSION_MAJOR +#define HAS_MANUAL_VERIFY_API +#endif +#else +#include +#ifdef CERT_CHAIN_REVOCATION_CHECK_CHAIN +#define HAS_MANUAL_VERIFY_API +#endif +#endif + struct curl_schannel_cred { CredHandle cred_handle; TimeStamp time_stamp; @@ -66,7 +79,9 @@ struct ssl_backend_data { bool recv_sspi_close_notify; /* true if connection closed by close_notify */ bool recv_connection_closed; /* true if connection closed, regardless how */ bool use_alpn; /* true if ALPN is used for this connection */ +#ifdef HAS_MANUAL_VERIFY_API bool use_manual_cred_validation; /* true if manual cred validation is used */ +#endif }; #endif /* EXPOSE_SCHANNEL_INTERNAL_STRUCTS */ -- cgit v1.2.3