diff options
author | Gisle Vanem <gisle.vanem@gmail.com> | 2018-06-08 15:10:05 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-06-08 23:25:17 +0200 |
commit | 274940d7438af7ef92ce3e11d75620db94675932 (patch) | |
tree | 7457bcb61eeec23d8432556f847062b0dfcfe4fe /lib/vtls/schannel.h | |
parent | 9ff67f7b00f16da9f9f3377b6b8f5859dd9cd2cb (diff) | |
download | curl-274940d7438af7ef92ce3e11d75620db94675932.tar.gz |
boringssl + schannel: undef X509_NAME in lib/schannel.h
Fixes the build problem when both boringssl and schannel are enabled.
Fixes #2634
Closes #2643
Diffstat (limited to 'lib/vtls/schannel.h')
-rw-r--r-- | lib/vtls/schannel.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index aa44e8e89..51417affe 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -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); |