mirror of
https://github.com/curl/curl.git
synced 2026-07-24 17:17:22 +03:00
- openssl: move and expand explanatory comment. - openssl: drop duplicate workaround. - schannel: drop workaround. Unnecessary, because OpenSSL headers are not included in or after schannel code. - schannel: drop explicit `wincrypt.h` include. It's indirectly included by system `<schannel.h>`. - ldap: drop explicit `wincrypt.h` include. It isn't used there, and also not required for the workaround. `winldap.h` keeps including it indirectly. Tested with BoringSSL and AWS-LC (MultiSSL with Schannel), also LDAP enabled, and H3, unity and non-unity, and all tested cases build fine. In lib in general, the point is to have the `#undef`s between the first `wincrypt.h` include [1] and the first OpenSSL include [2], within a single compilation unit. For non-unity builds the only such source is `openssl.c`. For unity ones, depending on batch size, in theory we should `#undef` after each `wincrypt.h` include. In practice this is overkill and most cases are covered by `#undef`-fing _first_ in `vtls/openssl.c`, and `#undef` in `ldap.c`. It's not impossible that we need to add more undefs after further `wincrypt.h` includes to cover so far undiscovered build cases [3]. Though I could not find more with the current sources and source order. It's also an option to include OpenSSL first, then `wincrypt.h`, as done in libtests, but for lib and `vtls/openssl.c` it's more practical to do the opposite. [1] can be indirect, e.g. via `iphlpapi.h`, `schannel.h`, `winldap.h`. [2] in - BoringSSL/AWS-LC: any include (due to `openssl/base.h`). Original fix removed by BoringSSL in year [2014]( |
||
|---|---|---|
| .. | ||
| apple.c | ||
| apple.h | ||
| cipher_suite.c | ||
| cipher_suite.h | ||
| gtls.c | ||
| gtls.h | ||
| hostcheck.c | ||
| hostcheck.h | ||
| keylog.c | ||
| keylog.h | ||
| mbedtls.c | ||
| mbedtls.h | ||
| openssl.c | ||
| openssl.h | ||
| rustls.c | ||
| rustls.h | ||
| schannel.c | ||
| schannel.h | ||
| schannel_int.h | ||
| schannel_verify.c | ||
| vtls.c | ||
| vtls.h | ||
| vtls_int.h | ||
| vtls_scache.c | ||
| vtls_scache.h | ||
| vtls_spack.c | ||
| vtls_spack.h | ||
| wolfssl.c | ||
| wolfssl.h | ||
| x509asn1.c | ||
| x509asn1.h | ||