diff --git a/lib/ldap.c b/lib/ldap.c index 51a32dc964..410dc72e8a 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -37,6 +37,18 @@ * OpenLDAP library versions, USE_OPENLDAP shall not be defined. */ +/* Wincrypt must be included before anything that could include OpenSSL. */ +#if defined(USE_WIN32_CRYPTO) +#include +/* Undefine wincrypt conflicting symbols for BoringSSL. */ +#undef X509_NAME +#undef X509_EXTENSIONS +#undef PKCS7_ISSUER_AND_SERIAL +#undef PKCS7_SIGNER_INFO +#undef OCSP_REQUEST +#undef OCSP_RESPONSE +#endif + #ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */ # include # ifndef LDAP_VENDOR_NAME diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index 0b4c4d9344..05323c7a7e 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -28,6 +28,18 @@ #ifdef USE_SCHANNEL +/* Wincrypt must be included before anything that could include OpenSSL. */ +#if defined(USE_WIN32_CRYPTO) +#include +/* Undefine wincrypt conflicting symbols for BoringSSL. */ +#undef X509_NAME +#undef X509_EXTENSIONS +#undef PKCS7_ISSUER_AND_SERIAL +#undef PKCS7_SIGNER_INFO +#undef OCSP_REQUEST +#undef OCSP_RESPONSE +#endif + #include #include #include "curl_sspi.h"