A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features
Find a file
Joel Depooter fe9898d26e
schannel: handle pkcs12 client certificates which contain CA certificates
The SChannel code uses the CertFindCertificateInStore function to
retrieve the client certificate from a pkcs12 certificate store.
However, when called with the CERT_FIND_ANY flag, this function does not
provide any guarantees on the order in which certificates are retrieved.
If a pkcs12 file contains an entire certificate chain instead of a
single client certificate, the CertFindCertificateInStore function may
return the CA or an intermediate certificate instead of the desired
client certificate. Since there is no associated private key for such a
certificate, the TLS handshake fails.

With this change, we now pass the CERT_FIND_HAS_PRIVATE_KEY flag. This
ensures that the CertFindCertificateInStore function will return a
certificate which has a corresponding private key. This will stop the CA
and intermediate certificates from being selected. I don't think there
would be much use in a client certificate which has no associated
private key, so this should ensure the client certificate is selected. I
suppose it may be possible for a pkcs12 file to contain multiple
certificates with private keys and the new behaviour may not guarantee
which is selected. However, this is no worse that the previous behaviour
in which any certificate may been selected.

The CERT_FIND_HAS_PRIVATE_KEY is only available in Windows 8 / Server
2012 (aka Windows NT6.2). For older versions, we will fall back to using
the CERT_FIND_ANY flag.

Closes #16825
2025-04-15 23:27:40 +02:00
.circleci GHA/linux: enable wolfSSH in a wolfSSL job 2025-01-17 00:20:54 +01:00
.github GHA/windows: bump a job to windows-2025 2025-04-15 18:30:44 +02:00
CMake cmake: merge CURL_WERROR logic into PickyWarnings.cmake 2025-04-15 14:48:48 +02:00
docs docs/INSTALL.md: drop reference to removed configure option 2025-04-11 15:25:44 +02:00
include RELEASE-NOTES: synced 2025-04-02 22:51:06 +02:00
lib schannel: handle pkcs12 client certificates which contain CA certificates 2025-04-15 23:27:40 +02:00
LICENSES copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
m4 build: check required rustls-ffi version 2025-04-09 09:29:20 +02:00
packages core: stop redefining E* macros on Windows, map EACCES, related fixes 2025-03-13 00:03:25 +01:00
plan9 copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
projects curltime: use libcurl time functions in src and tests/server 2025-03-12 11:33:26 +01:00
scripts lib: include files using known path 2025-04-08 17:00:00 +02:00
src tool_cb_write.c: handle EINTR on flush 2025-04-15 17:28:33 +02:00
tests curl_get_line: handle lines ending on the buffer boundary 2025-04-15 17:48:32 +02:00
winbuild winbuild: add the deprecation warning to the README 2025-04-05 14:51:00 -04:00
.dir-locals.el copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
.git-blame-ignore-revs copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
.gitattributes winbuild: MS-DOS batch tidy-ups 2024-07-02 19:26:15 +02:00
.gitignore tidy-up: .gitignore lines mostly 2025-01-27 20:59:46 +01:00
.mailmap ECH: update APIs to those agreed with OpenSSL maintainers 2025-01-10 08:36:25 +01:00
acinclude.m4 configure: fix --disable-rt 2025-04-03 11:10:47 +02:00
appveyor.sh runtests: drop logic calling the handle tool (Windows) 2025-03-19 18:49:54 +01:00
appveyor.yml appveyor: run VS2008 job with old CMake 3.12.2 2025-02-27 12:11:08 +01:00
buildconf copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CHANGES.md CHANGES: rename to CHANGES.md, no longer generated 2024-08-01 13:37:12 +02:00
CMakeLists.txt cmake: merge CURL_WERROR logic into PickyWarnings.cmake 2025-04-15 14:48:48 +02:00
configure.ac configure: catch asking for double resolver without https-rr 2025-04-11 15:27:11 +02:00
COPYING COPYING: bump copyright year range to 1996 - 2025 2025-01-01 21:12:12 +01:00
curl-config.in curl-config: tidy up, optimize 2024-12-24 01:21:38 +01:00
Dockerfile docs: fix incorrect shell substitution in docker run example command 2025-04-08 16:13:30 +02:00
GIT-INFO.md build: drop tool_hugehelp.c.cvs, tidy up macros, drop buildconf.bat 2025-01-26 14:22:49 +01:00
libcurl.pc.in configure: do not echo most inherited LDFLAGS to config files 2024-11-14 09:55:45 +01:00
Makefile.am dist: drop duplicate entry from CMAKE_DIST 2025-04-10 15:01:46 +02:00
README docs: minor grammar fixes 2022-09-29 10:44:12 +02:00
README.md docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
RELEASE-NOTES RELEASE-NOTES: synced 2025-04-10 08:45:02 +02:00
renovate.json GHA: drop "3" from openssl names and keys 2024-10-23 19:36:03 +02:00
REUSE.toml projects/Windows: remove wolfSSL from legacy projects 2024-12-22 03:10:35 -05:00
SECURITY.md docs: Clarify OpenSSF Best Practices vs Scorecard 2024-08-22 11:50:20 +02:00

curl logo

curl is a command-line tool for transferring data specified with URL syntax. Learn how to use curl by reading the manpage or everything curl.

Find out how to install curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl manpage to learn how.

Open Source

curl is Open Source and is distributed under an MIT-like license.

Contact

Contact us on a suitable mailing list or use GitHub issues/ pull requests/ discussions.

All contributors to the project are listed in the THANKS document.

Commercial support

For commercial support, maybe private and dedicated help with your problems or applications using (lib)curl visit the support page.

Website

Visit the curl website for the latest news and downloads.

Source code

Download the latest source from the Git server:

git clone https://github.com/curl/curl.git

Security problems

Report suspected security problems via our HackerOne page and not in public.

Notice

curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.

Backers

Thank you to all our backers 🙏 Become a backer.

Sponsors

Support this project by becoming a sponsor.