From: Gisle Vanem Date: Fri, 8 Jun 2018 13:10:05 +0000 (+0200) Subject: boringssl + schannel: undef X509_NAME in lib/schannel.h X-Git-Tag: curl-7_61_0~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=274940d7438af7ef92ce3e11d75620db94675932;p=thirdparty%2Fcurl.git boringssl + schannel: undef X509_NAME in lib/schannel.h Fixes the build problem when both boringssl and schannel are enabled. Fixes #2634 Closes #2643 --- diff --git a/lib/ldap.c b/lib/ldap.c index 89047bcbda..4d8f4fa288 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -54,15 +54,6 @@ # endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */ #endif -/* These are macros in both (in above ) and typedefs - * in BoringSSL's - */ -#ifdef HAVE_BORINGSSL -# undef X509_NAME -# undef X509_CERT_PAIR -# undef X509_EXTENSIONS -#endif - #include "urldata.h" #include #include "sendf.h" diff --git a/lib/vtls/schannel.h b/lib/vtls/schannel.h index aa44e8e89b..51417affe1 100644 --- a/lib/vtls/schannel.h +++ b/lib/vtls/schannel.h @@ -32,6 +32,25 @@ #include "urldata.h" +/* has been included via the above . + * Or in case of ldap.c, it was included via . + * And since has this: + * #define X509_NAME ((LPCSTR) 7) + * + * And in BoringSSL's there is: + * typedef struct X509_name_st X509_NAME; + * etc. + * + * this wil cause all kinds of C-preprocessing paste errors in + * BoringSSL's : 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);