curl/lib/vtls
Viktor Szakats f0f0a7f7d6
boringssl: fix more coexist cases with Schannel/WinCrypt
By moving the coexist workaround from vtls/openssl.c to vtls/openssl.h.
This way it also applies to vtls.c (and possibly other sources including
`vtls/openssl.h`), which may need it in unity builds before BoringSSL
header `openssl/ssl.h` pulling in the conflicting symbols and causing
conflicts otherwise.

Seen with build config:
```
-DCURL_USE_SCHANNEL=ON -DCURL_USE_OPENSSL=ON
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30
```

Fixing:
```
In file included from _cm-win-boringssl/lib/CMakeFiles/libcurl_object.dir/Unity/unity_5_c.c:7:
In file included from lib/vtls/vtls.c:54:
In file included from lib/vtls/openssl.h:33:
In file included from /path/to/boringssl/_x64-win-ucrt/usr/include/openssl/opensslv.h:18:
In file included from /path/to/boringssl/_x64-win-ucrt/usr/include/openssl/crypto.h:18:
/path/to/boringssl/_x64-win-ucrt/usr/include/openssl/base.h:293:29: error: expected ')'
  293 | typedef struct X509_name_st X509_NAME;
      |                             ^
/path/to/llvm-mingw/x86_64-w64-mingw32/include/wincrypt.h:1515:29: note: expanded from macro 'X509_NAME'
 1515 | #define X509_NAME ((LPCSTR) 7)
      |                             ^
[...]
```

Ref: 2a92c39a21 #20567

Closes #21136
2026-03-28 15:52:41 +01:00
..
apple.c badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
apple.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
cipher_suite.c lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
cipher_suite.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
gtls.c gnutls: fix clang-tidy warning with !verbose 2026-03-22 19:15:56 +01:00
gtls.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
hostcheck.c lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
hostcheck.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
keylog.c keylog: drop unused/redundant includes and guards 2026-03-28 12:20:03 +01:00
keylog.h keylog.h: replace literal number with macro in declaration 2026-03-28 15:51:04 +01:00
mbedtls.c badwords: prefer 'null-terminated' 2026-03-18 11:40:13 +01:00
mbedtls.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
openssl.c boringssl: fix more coexist cases with Schannel/WinCrypt 2026-03-28 15:52:41 +01:00
openssl.h boringssl: fix more coexist cases with Schannel/WinCrypt 2026-03-28 15:52:41 +01:00
rustls.c dnscache: own source file, improvements 2026-03-21 12:04:36 +01:00
rustls.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
schannel.c badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
schannel.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
schannel_int.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
schannel_verify.c badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
vtls.c dnscache: own source file, improvements 2026-03-21 12:04:36 +01:00
vtls.h urldata: import port types and conn destination format 2026-03-15 12:02:26 +01:00
vtls_int.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
vtls_scache.c docs: avoid starting sentences with However, 2026-03-07 23:49:11 +01:00
vtls_scache.h badwords: rework exceptions, fix many of them 2026-03-12 01:01:16 +01:00
vtls_spack.c lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
vtls_spack.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
wolfssl.c wolfssl: document v5.0.0 (2021-11-01) as minimum required 2026-03-24 11:08:23 +01:00
wolfssl.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
x509asn1.c x509asn1: fixed and adapted for ASN1tostr unit testing 2026-03-20 13:03:40 +01:00
x509asn1.h x509asn1: fixed and adapted for ASN1tostr unit testing 2026-03-20 13:03:40 +01:00