1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-12 04:25:08 -05:00

boringssl + schannel: undef X509_NAME in lib/schannel.h

Fixes the build problem when both boringssl and schannel are enabled.

Fixes #2634
Closes #2643
This commit is contained in:
Gisle Vanem 2018-06-08 15:10:05 +02:00 committed by Daniel Stenberg
parent 9ff67f7b00
commit 274940d743
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 19 additions and 9 deletions

View File

@ -54,15 +54,6 @@
# endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
#endif
/* These are macros in both <wincrypt.h> (in above <winldap.h>) and typedefs
* in BoringSSL's <openssl/x509.h>
*/
#ifdef HAVE_BORINGSSL
# undef X509_NAME
# undef X509_CERT_PAIR
# undef X509_EXTENSIONS
#endif
#include "urldata.h"
#include <curl/curl.h>
#include "sendf.h"

View File

@ -32,6 +32,25 @@
#include "urldata.h"
/* <wincrypt.h> has been included via the above <schnlsp.h>.
* Or in case of ldap.c, it was included via <winldap.h>.
* And since <wincrypt.h> has this:
* #define X509_NAME ((LPCSTR) 7)
*
* And in BoringSSL's <openssl/base.h> there is:
* typedef struct X509_name_st X509_NAME;
* etc.
*
* this wil cause all kinds of C-preprocessing paste errors in
* BoringSSL's <openssl/x509.h>: So just undefine those defines here
* (and only here).
*/
#if defined(HAVE_BORINGSSL) || defined(OPENSSL_IS_BORINGSSL)
# undef X509_NAME
# undef X509_CERT_PAIR
# undef X509_EXTENSIONS
#endif
extern const struct Curl_ssl Curl_ssl_schannel;
CURLcode verify_certificate(struct connectdata *conn, int sockindex);