#
6b2bc813 |
| 01-Nov-2024 |
Daniel Stenberg |
openssl: extend the OpenSSL error messages Previously there were three error situations that only added the (unhelpful) OpenSSL error strings, now we prefix those with a short explanatio
openssl: extend the OpenSSL error messages Previously there were three error situations that only added the (unhelpful) OpenSSL error strings, now we prefix those with a short explanation for the error situation. Reported-by: Jeroen Ooms Fixes #15473 Closes #15474
show more ...
|
#
cd2b4520 |
| 28-Oct-2024 |
Daniel Stenberg |
src/lib: remove redundant ternary operators Closes #15435
|
#
080973dc |
| 28-Oct-2024 |
Daniel Stenberg |
lib: msnprintf tidy-ups doh: avoid an msnprintf() openssl: skip a superfluous return code check Closes #15434
|
#
cb011ac0 |
| 28-Oct-2024 |
Daniel Stenberg |
tls: avoid abusing CURLE_SSL_ENGINE_INITFAILED That error code was introduced and has been used for OpenSSL ENGINE things and not others, so switch the other use cases over to other TLS
tls: avoid abusing CURLE_SSL_ENGINE_INITFAILED That error code was introduced and has been used for OpenSSL ENGINE things and not others, so switch the other use cases over to other TLS related error codes. Closes #15430
show more ...
|
#
8cb2d5f4 |
| 22-Oct-2024 |
Stefan Eissing |
quic: use the session cache with wolfSSL as well Use session cache for QUIC when built with quictls or wolfSSL. Add test_017_10 for verifying QUIC TLS session reuse when built with
quic: use the session cache with wolfSSL as well Use session cache for QUIC when built with quictls or wolfSSL. Add test_017_10 for verifying QUIC TLS session reuse when built with quictls, gnutls or wolfssl. Closes #15358
show more ...
|
#
7dd7cbac |
| 18-Oct-2024 |
Viktor Szakats |
version: say quictls in MSH3 builds Before: `curl 8.11.0-DEV (x86_64-pc-linux-gnu) libcurl/8.11.0-DEV OpenSSL/3.3.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libpsl/0.21.2 msh3/0.6.0.0` After: `
version: say quictls in MSH3 builds Before: `curl 8.11.0-DEV (x86_64-pc-linux-gnu) libcurl/8.11.0-DEV OpenSSL/3.3.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libpsl/0.21.2 msh3/0.6.0.0` After: `curl 8.11.0-DEV (x86_64-pc-linux-gnu) libcurl/8.11.0-DEV quictls/3.3.0 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libpsl/0.21.2 msh3/0.6.0.0` Closes #15335
show more ...
|
#
b42eb27c |
| 17-Oct-2024 |
Stefan Eissing |
openssl: improve retries on shutdown Once SSL_shutdown() has been called, OpenSSL does not really seem to like it when it is called again and the other side has some finally data to
openssl: improve retries on shutdown Once SSL_shutdown() has been called, OpenSSL does not really seem to like it when it is called again and the other side has some finally data to deliver. Instead SSL_read() needs to be used solely, once the close notify has been sent from curl's side. Closes #15321
show more ...
|
#
962097b8 |
| 09-Oct-2024 |
Stefan Eissing |
TLS: TLSv1.3 earlydata support for curl Based on #14135, implement TLSv1.3 earlydata support for the curl command line, libcurl and its implementation in GnuTLS. If a known TLS
TLS: TLSv1.3 earlydata support for curl Based on #14135, implement TLSv1.3 earlydata support for the curl command line, libcurl and its implementation in GnuTLS. If a known TLS session announces early data support, and the feature is enabled *and* it is not a "connect-only" transfer, delay the TLS handshake until the first request is being sent. - Add --tls-earldata as new boolean command line option for curl. - Add CURLSSLOPT_EARLYDATA to libcurl to enable use of the feature. - Add CURLINFO_EARLYDATA_SENT_T to libcurl, reporting the amount of bytes sent and accepted/rejected by the server. Implementation details: - store the ALPN protocol selected at the SSL session. - When reusing the session and enabling earlydata, use exactly that ALPN protocol for negoptiation with the server. When the sessions ALPN does not match the connections ALPN, earlydata will not be enabled. - Check that the server selected the correct ALPN protocol for an earlydata connect. If the server does not confirm or reports something different, the connect fails. - HTTP/2: delay sending the initial SETTINGS frames during connect, if not connect-only. Verification: - add test_02_32 to verify earlydata GET with nghttpx. - add test_07_70 to verify earlydata PUT with nghttpx. - add support in 'hx-download', 'hx-upload' clients for the feature Assisted-by: ad-chaos on github Closes #15211
show more ...
|
#
bcec0840 |
| 02-Oct-2024 |
Daniel Stenberg |
lib: use bool/TRUE/FALSE properly booleans should use the type 'bool' and set the value to TRUE/FALSE non-booleans should not be 'bool' and should not set the value to TRUE/FALS
lib: use bool/TRUE/FALSE properly booleans should use the type 'bool' and set the value to TRUE/FALSE non-booleans should not be 'bool' and should not set the value to TRUE/FALSE Closes #15123
show more ...
|
#
5d7275d5 |
| 26-Sep-2024 |
Daniel Stenberg |
openssl: convert a memcpy to dynbuf use and avoid an alloc for CN handling unless necessary Closes #15049
|
#
4e22d7c5 |
| 26-Sep-2024 |
Daniel Stenberg |
openssl: remove two strcpy() calls Closes #15052
|
#
1064dfa8 |
| 26-Aug-2024 |
Viktor Szakats |
tidy-up: indent, whitespace, comment in sources Cherry-picked from #14692 Closes #14995
|
#
fbf5d507 |
| 18-Sep-2024 |
Daniel Stenberg |
lib/src: white space edits to comply better with code style ... as checksrc now finds and complains about these. Closes #14921
|
#
5a263710 |
| 14-Sep-2024 |
Gabriel Marin |
lib, src, tests: added space around ternary expressions Closes #14912
|
#
6588a7f0 |
| 04-Sep-2024 |
Daniel Stenberg |
openssl: certinfo errors now fail correctly If there is a (memory) error when creating the certinfo data, the code would previously continue which could lead to a partial/broken response
openssl: certinfo errors now fail correctly If there is a (memory) error when creating the certinfo data, the code would previously continue which could lead to a partial/broken response. Now, the first error aborts and cleans up the entire thing. A certinfo "collection" error is however still not considered an error big enough to stop the handshake. Bonus 1: made two functions static (and removed the Curl_ prefix) that were not used outside of openssl.c Bonus 2: removed the unused function Curl_ossl_set_client_cert Closes #14780
show more ...
|
#
a2bcec0e |
| 31-Aug-2024 |
Aki Sakurai <75532970+AkiSakurai@users.noreply.github.com> |
openssl: fix the data race when sharing an SSL session between threads The SSL_Session object is mutated during connection inside openssl, and it might not be thread-safe. Besides, accor
openssl: fix the data race when sharing an SSL session between threads The SSL_Session object is mutated during connection inside openssl, and it might not be thread-safe. Besides, according to documentation of openssl: ``` SSL_SESSION objects keep internal link information about the session cache list, when being inserted into one SSL_CTX object's session cache. One SSL_SESSION object, regardless of its reference count, must therefore only be used with one SSL_CTX object (and the SSL objects created from this SSL_CTX object). ``` If I understand correctly, it is not safe to share it even in a single thread. Instead, serialize the SSL_SESSION before adding it to the cache, and deserialize it after retrieving it from the cache, so that no concurrent write to the same object is infeasible. Also - add a ci test for thread sanitizer - add a test for sharing ssl sessions concurrently - avoid redefining memory functions when not building libcurl, but including the soruce in libtest - increase the concurrent connections limit in sws Notice that there are fix for a global data race for openssl which is not yet release. The fix is cherry pick for the ci test with thread sanitizer. https://github.com/openssl/openssl/commit/d8def79838cd0d5e7c21d217aa26edb5229f0ab4 Closes #14751
show more ...
|
#
269fdd4c |
| 31-Aug-2024 |
Daniel Stenberg |
lib: remove use of RANDOM_FILE It could previously be set with configure/cmake and used in rare cases for reading randomness: with ancient mbedTLS or rustls without arc4random.
lib: remove use of RANDOM_FILE It could previously be set with configure/cmake and used in rare cases for reading randomness: with ancient mbedTLS or rustls without arc4random. We now get randomness in this order: 1. The TLS library's way to provide random 2. On Windows: Curl_win32_random 3. if arc4random exists, use that 4. weak non-crytographically strong pseudo-random Closes #14749
show more ...
|
#
71d3ab58 |
| 11-Aug-2024 |
Viktor Szakats |
vtls: fix static function name collisions between TLS backends When using CMake Unity build. - use unique name for `set_ssl_version_min_max()` Fixes collision between GnuTLS,
vtls: fix static function name collisions between TLS backends When using CMake Unity build. - use unique name for `set_ssl_version_min_max()` Fixes collision between GnuTLS, mbedTLS and SecureTransport. ``` lib\vtls\mbedtls.c(317,1): error C2084: function 'CURLcode set_ssl_version_min_max(Curl_easy *,ssl_peer *,ssl_primary_config *,const char **,const char *)' already has a body lib\vtls\mbedtls.c(837,49): warning C4133: 'function': incompatible types - from 'Curl_cfilter *' to 'Curl_easy *' lib\vtls\mbedtls.c(837,53): warning C4133: 'function': incompatible types - from 'Curl_easy *' to 'ssl_peer *' lib\vtls\mbedtls.c(837,25): error C2198: 'set_ssl_version_min_max': too few arguments for call ``` - use unique name for `do_file_type()` Fixes collision between GnuTLS, OpenSSL and wolfSSL. ``` lib\vtls\openssl.c(1053,12): error C2084: function 'gnutls_x509_crt_fmt_t do_file_type(const char *)' already has a body ``` Ref: https://github.com/curl/curl/actions/runs/10341162641/job/28622681573?pr=14484#step:10:31 Cherry-picked from #14495 Closes #14516
show more ...
|
#
0a5ea09a |
| 29-Feb-2024 |
Max Faxälv |
spnego_gssapi: implement TLS channel bindings for openssl Channel Bindings are used to tie the session context to a specific TLS channel. This is to provide additional proof of valid ide
spnego_gssapi: implement TLS channel bindings for openssl Channel Bindings are used to tie the session context to a specific TLS channel. This is to provide additional proof of valid identity, mitigating authentication relay attacks. Major web servers have the ability to require (None/Accept/Require) GSSAPI channel binding, rendering Curl unable to connect to such websites unless support for channel bindings is implemented. IIS calls this feature Extended Protection (EPA), which is used in Enterprise environments using Kerberos for authentication. This change require krb5 >= 1.19, otherwise channel bindings won't be forwarded through SPNEGO. Co-Authored-By: Steffen Kieß <947515+steffen-kiess@users.noreply.github.com> Closes #13098
show more ...
|
#
5c2ab55a |
| 05-Aug-2024 |
Jan Venekamp <1422460+jan2000@users.noreply.github.com> |
vtls: add SSLSUPP_CIPHER_LIST Added SSLSUPP_CIPHER_LIST so be able to differniate SSL Backends that support CURLOPT_SSL_CIPHER_LIST. Closes #14406
|
#
4494005b |
| 04-Aug-2024 |
Stefan Eissing |
openssl: improve shutdown handling Make sure that `io_need` is cleared and set at the filter operations. Add some more tracing for shutdown situations. Improve shutdown handling
openssl: improve shutdown handling Make sure that `io_need` is cleared and set at the filter operations. Add some more tracing for shutdown situations. Improve shutdown handling for blocked sends. OpenSSL is a bit tricksy here that it only reports WANT_WRITE on SSL_shutdown(), but never on SSL_read() on blocked sends. So we need to use both. At last, set SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER when available since we are not always retrying sends from the very same address, as testing showed. Closes #14375
show more ...
|
#
911c3166 |
| 18-Jul-2024 |
Stefan Eissing |
lib: add eos flag to send methods Adds a `bool eos` flag to send methods to indicate that the data is the last chunk the invovled transfer wants to send to the server. This will
lib: add eos flag to send methods Adds a `bool eos` flag to send methods to indicate that the data is the last chunk the invovled transfer wants to send to the server. This will help protocol filters like HTTP/2 and 3 to forward the stream's EOF flag and also allow to EAGAIN such calls when buffers are not yet fully flushed. Closes #14220
show more ...
|
#
5a9262a3 |
| 12-Jul-2024 |
Stefan Eissing |
url: dns_entry related improvements Replace Curl_resolv_unlock() with Curl_resolv_unlink(): -replace inuse member with refcount in Curl_dns_entry - pass Curl_dns_entry ** t
url: dns_entry related improvements Replace Curl_resolv_unlock() with Curl_resolv_unlink(): -replace inuse member with refcount in Curl_dns_entry - pass Curl_dns_entry ** to unlink, so it gets always cleared - solve potential (but unlikley) UAF in FTP's handling of looked up Curl_dns_entry. Esp. do not use addr information after unlinking an entry. In reality, the unlink will not free memory, as the dns entry is still referenced by the hostcache. But this is not safe and relying on no other code pruning the cache in the meantime. - pass permanent flag when adding a dns entry instead of fixing timestamp afterwards. url.c: fold several static *resolve_* functions into one. Closes #14195
show more ...
|
#
8153b8e5 |
| 30-Jul-2024 |
Viktor Szakats |
tidy-up: URL updates (one more) Follow-up to 767d5811b5c783b42cea999dd42ecf0453085d17 #14318
|
#
767d5811 |
| 30-Jul-2024 |
Viktor Szakats |
tidy-up: URL updates Closes #14318
|