curl/lib/vtls
Viktor Szakats 969351bb1e
windows: fix CreateFile() calls to support long filenames
It makes them work in Schannel's CA bundle loader, and curl tool's
set/get file timestamp operations (e.g. in `-R`/`--remote-time`). Also
to match file open operations, that already support long filenames.

E.g. when using `--remote-time`, fixing:
```
Warning: Failed to set filetime 1741363917 on outfile: CreateFile failed:
Warning: GetLastError 0x00000003
```

The special long filename logic is necessary to support Windows releases
prior to Windows 10 v1607. With the latter, it's possible to opt-in to
this behavior via a manifest setting. Note that Windows itself also needs
to opt-in to support this. Finally note that curl itself needs passing
`--globoff` to let long filenames through, pending #20044 and #20046.

Refs:
https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-createfilea
https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation

Ref: #8361
Inspired by: #19286
Inspired-by: Mathesh V
Closes #19286
Closes #20040
2025-12-20 14:16:42 +01:00
..
apple.c tidy-up: one more round of formatting nits 2025-12-04 19:30:59 +01:00
apple.h apple sectrust: add to features 2025-10-16 10:58:45 +02:00
cipher_suite.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
cipher_suite.h TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00
gtls.c build: drop unused multiif.h includes 2025-12-19 01:45:05 +01:00
gtls.h build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
hostcheck.c hostcheck: fail wildcard match if host starts with a dot 2025-12-08 10:42:49 +01:00
hostcheck.h build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
keylog.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
keylog.h spelling: 'a' vs 'an' 2025-05-30 11:38:35 +02:00
mbedtls.c build: drop unused multiif.h includes 2025-12-19 01:45:05 +01:00
mbedtls.h lib: include files using known path 2025-04-08 17:00:00 +02:00
mbedtls_threadlock.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
mbedtls_threadlock.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
openssl.c openssl: drop includes unused or duplicate 2025-12-20 13:51:05 +01:00
openssl.h openssl: simplify HAVE_KEYLOG_CALLBACK guard 2025-12-04 22:49:03 +01:00
rustls.c build: drop unused curlx/inet_pton.h includes 2025-12-19 01:34:56 +01:00
rustls.h lib: include files using known path 2025-04-08 17:00:00 +02:00
schannel.c build: drop unused multiif.h includes 2025-12-19 01:45:05 +01:00
schannel.h openssl: drop includes unused or duplicate 2025-12-20 13:51:05 +01:00
schannel_int.h time-keeping: keep timestamp in multi, always update 2025-12-18 22:10:06 +01:00
schannel_verify.c windows: fix CreateFile() calls to support long filenames 2025-12-20 14:16:42 +01:00
vtls.c lib: drop unused rand.h includes 2025-12-20 13:51:04 +01:00
vtls.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
vtls_int.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
vtls_scache.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
vtls_scache.h lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
vtls_spack.c lib/subdirs: fix formatting nits 2025-11-30 11:01:50 +01:00
vtls_spack.h build: fix build errors/warnings in rare configurations 2025-07-23 22:17:03 +02:00
wolfssl.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
wolfssl.h wolfssl: fix possible assert with !HAVE_NO_EX wolfSSL builds 2025-12-07 17:01:45 +01:00
x509asn1.c build: drop duplicate include curl/curl.h and others 2025-12-19 10:58:11 +01:00
x509asn1.h build: address some -Weverything warnings, update picky warnings 2025-09-20 10:16:15 +02:00