mirror of
https://github.com/curl/curl.git
synced 2025-02-05 14:30:10 +08:00
openssl: fix BoringSSL symbol conflicts with LDAP and Schannel
Same issue as here [1], but this time when building curl with BoringSSL
for Windows with LDAP(S) or Schannel support enabled.
Apply the same fix [2] for these source files as well.
This can also be fixed by moving `#include "urldata.h"` _before_
including `winldap.h` and `schnlsp.h` respectively. This seems like
a cleaner fix, though I'm not sure why it works and if it has any
downside.
[1] https://github.com/curl/curl/issues/5669
[2] fbe07c6829
Co-authored-by: Jay Satiro
Closes #9110
This commit is contained in:
parent
451bcc1a91
commit
4c46c829f5
12
lib/ldap.c
12
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 <wincrypt.h>
|
||||
/* 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 <winldap.h>
|
||||
# ifndef LDAP_VENDOR_NAME
|
||||
|
@ -28,6 +28,18 @@
|
||||
|
||||
#ifdef USE_SCHANNEL
|
||||
|
||||
/* Wincrypt must be included before anything that could include OpenSSL. */
|
||||
#if defined(USE_WIN32_CRYPTO)
|
||||
#include <wincrypt.h>
|
||||
/* 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 <schnlsp.h>
|
||||
#include <schannel.h>
|
||||
#include "curl_sspi.h"
|
||||
|
Loading…
Reference in New Issue
Block a user