diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2018-05-16 02:02:29 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2018-05-16 02:21:05 -0400 |
commit | 4584cc44996c2db82542f0e702aee4a6ce5dcb18 (patch) | |
tree | 14922b0c0bc8c95e336c64773cb41c327e5eab20 /lib/vtls/schannel.h | |
parent | 1592ea979220c28d240492a0ea2e127478e2089c (diff) | |
download | curl-4584cc44996c2db82542f0e702aee4a6ce5dcb18.tar.gz |
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.
Diffstat (limited to 'lib/vtls/schannel.h')
-rw-r--r-- | lib/vtls/schannel.h | 15 |
1 files changed, 15 insertions, 0 deletions
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 <wincrypt.h> +#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 */ |