Commit Graph

29671 Commits

Author SHA1 Message Date
Daniel Stenberg
0978b2ef25
.github/workflows/linux.yml: add a quiche CI job
Move over from zuul

Closes #10241
2023-01-09 11:09:33 +01:00
Daniel Stenberg
5cb63da771
curl.h: allow up to 10M buffer size
Bump the limit from 512K. There might be reasons for applications using
h3 to set larger buffers and there is no strong reason for curl to have
a very small maximum.

Ref: https://curl.se/mail/lib-2023-01/0026.html

Closes #10256
2023-01-08 20:54:48 +01:00
Tatsuhiro Tsujikawa
3022eeaefe
GHA: use designated ngtcp2 and its dependencies versions
Designate ngtcp2 and its dependency versions so that the CI build does
not fail without our control.

Closes #10257
2023-01-08 20:31:52 +01:00
Daniel Stenberg
5a9a5e171e
docs/cmdline-opts/hsts.d: explain hsts more
Closes #10258
2023-01-08 11:08:10 +01:00
Stefan Eissing
4303093cd5
msh3: run again in its cfilter
- test 2500, single GET works
- test 2501, single POST stalls
- test 2502, multiple, sequential GETs each use a new connection since
  MsH3ConnectionGetState(qconn) no longer reports CONNECTED after one
  GET.

Closes #10204
2023-01-08 11:06:30 +01:00
Jay Satiro
260fea215a sendf: fix build for Linux TCP fastopen
- Fix the remote addr struct dereference.

- Include cf-socket.h in urldata.h.

Follow-up to 6a8d7ef9 which changed conn->ipaddr (Curl_addrinfo* )
member to conn->remote_addr (Curl_sockaddr_ex *) several days ago.

Reported-by: Stephan Guilloux

Fixes https://github.com/curl/curl/issues/10249
Closes https://github.com/curl/curl/pull/10250
2023-01-08 03:32:06 -05:00
Daniel Stenberg
91576eba57
RELEASE-NOTES: synced 2023-01-07 23:09:28 +01:00
Daniel Stenberg
b45b6b618d
setopt: move the SHA256 opt within #ifdef libssh2
Because only the libssh2 backend not supports it and thus this should
return error if this option is used other backends.

Reported-by: Harry Sintonen

Closes #10255
2023-01-07 23:01:52 +01:00
Patrick Monnerat
ee0f73919a
nss: implement data_pending method
NSS currently uses the default Curl_none_data_pending() method which
always returns false, causing TLS buffered input data to be missed.

The current commit implements the nss_data_pending() method that properly
monitors the presence of available TLS data.

Ref:#10077

Closes #10225
2023-01-07 14:19:31 +01:00
Jay Satiro
d7b56ac75c CURLOPT_HEADERDATA.3: warn DLL users must set write function
- Warn that in Windows if libcurl is running from a DLL and if
  CURLOPT_HEADERDATA is set then CURLOPT_WRITEFUNCTION or
  CURLOPT_HEADERFUNCTION must be set as well, otherwise the user may
  experience crashes.

We already have a similar warning in CURLOPT_WRITEDATA. Basically, in
Windows libcurl could crash writing a FILE pointer that was created by
a different C runtime. In Windows each DLL that is part of a program may
or may not have its own C runtime.

Ref: https://github.com/curl/curl/issues/10231

Closes https://github.com/curl/curl/pull/10233
2023-01-06 03:45:17 -05:00
jonrumsey
1f693e0aca
x509asn1: fix compile errors and warnings
Various small issues when built for GSKit

Closes #10238
2023-01-05 23:51:27 +01:00
Patrick Monnerat
f22cd67b7d
runtests: fix detection of TLS backends
Built-in TLS backends are detected at test time by scanning for their
names in the version string line returned by the cli tool: as this line
may also list the libssh configuration that mentions its own backend,
the curl backend may be wrongly determined.

In example, if the version line contains "libssh/0.10.4/openssl/zlib",
OpenSSL is detected as a curl-configured backend even if not.

This fix requires the backend names to appear as full words preceded by
spacing in the version line to be recognized as curl TLS backends.

Closes #10236
2023-01-05 23:49:10 +01:00
andy5995
f92aae86c6
GHA: add job on Slackware 15.0
Closes #10230
2023-01-05 23:44:48 +01:00
Daniel Stenberg
4cfab52721
test363: make even smaller writes to loop more 2023-01-05 23:43:02 +01:00
Daniel Stenberg
3f3ddee066
http_proxy: do not assign data->req.p.http use local copy
Avoid the tricky reusing of the data->req.p.http pointer for http proxy
tunneling.

Fixes #10194
Closes #10234
2023-01-05 23:43:02 +01:00
Stefan Eissing
446267c555
quic: rename vquic implementations, fix for quiche build.
- quiche in debug mode did not build, fixed.
- moved all vquic implementation files to prefix curl_* to avoid
  the potential mixups between provided .h files and our own.
- quich passes test 2500 and 2502. 2501, the POST, fail with
  the body being rejected. Quich bug?

Closes #10242
2023-01-05 23:39:49 +01:00
Stefan Eissing
16bb32e104
sectransp: fix for incomplete read/writes
SecureTransport expects result code errSSLWouldBlock when the requested
length could not be sent/recieved in full. The previous code returned
noErr, which let SecureTransport to believe that the IO had terminated
prematurely.

Fixes #10227
Closes #10235
2023-01-05 16:04:12 +01:00
andy5995
21f5b6bfb7
GHA: Hacktoberfest CI: Update deprecated 'set-output' command
Closes #10221
2023-01-05 10:12:57 +01:00
Jay Satiro
602964ec5e scripts: set file mode +x on all perl and shell scripts
- Set all scripts +x, ie 644 => 755.

Prior to this change some scripts were not executable and therefore
could not be called directly.

~~~
git ls-files -s \*.{sh,pl,py} | grep -v 100755
~~~

Closes https://github.com/curl/curl/pull/10219
2023-01-05 02:34:24 -05:00
Stefan Eissing
24e4e57cf3
tool_operate: fix headerfile writing
Do not rely on the first transfer started to be the first to get a
response (remember -Z). All transfers now write the headefile (-D) in
append mode, making sure that the order of transfer responses does not
lead to overwrites of previous data.

Closes #10224
2023-01-04 23:11:54 +01:00
Daniel Stenberg
1485e89213
misc: reduce struct and struct field sizes
- by using BIT() instead of bool
- imap: shrink struct
- ftp: make state 'unsigned char'
- ftp: sort ftp_conn struct entries on size
- urldata: use smaller fields for SSL version info storage
- pop3: reduce the pop3_conn struct size
- smtp: reduce the size of the smtp structs

Closes #10186
2023-01-04 15:36:36 +01:00
Daniel Stenberg
7ad8a7ba9e
noproxy: support for space-separated names is deprecated
To be removed in July 2024.

Assisted-by: Michael Osipov
Fixes #10209
Closes #10215
2023-01-04 09:15:37 +01:00
Andrei Rybak
bb393e521f
lib: fix typos in comments which repeat a word
Remove erroneously duplicated words in code comments of files
`lib.connect.c` and `lib/url.c`.

Closes #10220
2023-01-04 09:12:58 +01:00
Radek Brich
3ef31a16fc
cmake: set SOVERSION also for macOS
Closes #10214
2023-01-03 23:51:40 +01:00
Jay Satiro
fcd1b547d4 http2: fix compiler warning due to uninitialized variable
Prior to this change http2_cfilter_add could return an uninitialized
cfilter pointer in an OOM condition. In this case though, the pointer
is discarded and not dereferenced so there was no risk of a crash.
2023-01-03 17:15:26 -05:00
Stefan Eissing
6a8d7ef981
cf-socket: keep sockaddr local in the socket filters
- copy `struct Curl_addrinfo` on filter setup into context
- remove `struct Curl_addrinfoi *` with `struct Curl_sockaddr_ex *` in
  connectdata that is set and NULLed by the socket filter
- this means we have no reference to the resolver info in connectdata or
  its filters
- trigger the CF_CTRL_CONN_INFO_UPDATE event when the complete filter
  chain reaches connected status
- update easy handle connection information on CF_CTRL_DATA_SETUP event.

Closes #10213
2023-01-03 17:33:29 +01:00
Daniel Stenberg
436d63fbb1
RELEASE-NOTES: synced 2023-01-03 09:34:54 +01:00
Daniel Stenberg
22f795c834
runtests: consider warnings fatal and error on them
To help us detect and fix warnings in this script easier and faster.

Assisted-by: Jakob Hirsch

Ref: #10206
Closes #10208
2023-01-03 09:29:52 +01:00
Daniel Stenberg
2bc1d775f5
copyright: update all copyright lines and remove year ranges
- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205
2023-01-03 09:19:21 +01:00
Daniel Stenberg
3e9c2924d6
docs/DEPRECATE.md: deprecate gskit
Ref: #10163

- This is a niche TLS library, only running on some IBM systems
- no regular curl contributors use this backend
- no CI builds use or verify this backend
- gskit, or the curl adaption for it, lacks many modern TLS features
  making it an inferior solution
- build breakages in this code take weeks or more to get detected
- fixing gskit code is mostly done "flying blind"

Closes #10201
2023-01-03 09:06:36 +01:00
Daniel Stenberg
4fc7737742
Revert "x509asn1: avoid freeing unallocated pointers"
This reverts commit 6b19247e79.

Fixes #10163
Closes #10207
2023-01-03 09:02:15 +01:00
Daniel Stenberg
e6002e9012
ngtcp2: fix the build without 'sendmsg'
Follow-up from 71b7e01610

Closes #10210
2023-01-03 08:54:22 +01:00
Daniel Stenberg
f86894a38c
cmake: check for sendmsg
Used by ngtcp2

Closes #10211
2023-01-03 08:51:51 +01:00
Timmy Schierling
7baff01fd6
runtest.pl: add expected fourth return value
Fixes warning in autobild log: "Use of uninitialized value $HTTP2TLSPORT
in substitution iterator at /tests/runtests.pl line 3516"

Closes #10206
2023-01-02 16:03:28 +01:00
Daniel Stenberg
b637f35346
http2: when using printf %.*s, the length arg must be 'int'
Detected by Coverity CID 1518341

Closes #10203
2023-01-02 13:24:37 +01:00
Daniel Stenberg
42c3b23a7c
cfilters: check for NULL before using pointer
Detected by Coverity CID 1518343

Closes #10202
2023-01-02 13:18:58 +01:00
Daniel Stenberg
ed18244df1
http2: in connisdead check, attach the connection before reading
Otherwise data->conn is NULL and things go wrong.

This problem caused occastional failures in test 359, 1700 and more
depending on timing and the alignment of various planets.

Assisted-by: Stefan Eissing

Closes #10199
2023-01-02 13:16:24 +01:00
Philip H
4556665ad1
Linux CI: update some dependecies to latest tag
Closes #10195
2023-01-02 11:56:49 +01:00
Daniel Stenberg
5c544b4912
c-hyper: move down the Accept-Encoding header generation
To match the internal HTTP request header order so that test 1277 works
again.

Closes #10200
2023-01-02 11:51:30 +01:00
Daniel Stenberg
9ca194b5e2
release-notes.pl: check fixes/closes lines better
To better skip lines that just happen to mention those words at the
start of a line without being instructions.
2023-01-02 11:31:29 +01:00
Daniel Stenberg
f27262b179
test1560: use a UTF8-using locale when run
There are odd cases that don't use UTF8 and then the IDN handling goes
wrong.

Reported-by: Marcel Raad
Fixes #10193
Closes #10196
2023-01-02 10:35:42 +01:00
Daniel Stenberg
36dce55629
cf-socket: fix build regression
Reported-by: Stephan Guilloux
Fixes #10190
Closes #10191
2023-01-02 10:34:14 +01:00
Daniel Stenberg
b8b483b0c4
examples: remove the curlgtk.c example
- it does not add a lot of value
- we do not test-build it to verify because of its dependencies
- unclear for what GTK versions it works or not

Reported-by: odek86 on github

Fixes #10197
Closes #10198
2023-01-02 10:19:35 +01:00
andy5995
d68e0a0cc2
docs: add link to GitHub Discussions
Closes #10171
2023-01-02 00:26:37 +01:00
andy5995
92abdaf8e2
GHA: ignore changes to md files for most workflows
Closes #10176
2023-01-02 00:13:02 +01:00
Josh Brobst
aa6e7a1f45
http: decode transfer encoding first
The unencoding stack is added to as Transfer-Encoding and
Content-Encoding fields are encountered with no distinction between the
two, meaning the stack will be incorrect if, e.g., the message has both
fields and a non-chunked Transfer-Encoding comes first. This commit
fixes this by ordering the stack with transfer encodings first.

Reviewed-by: Patrick Monnerat
Closes #10187
2023-01-02 00:06:15 +01:00
Daniel Stenberg
fc9f22b46e
curl.h: mark CURLSSLBACKEND_MESALINK as deprecated
Follow-up since 223f26c28a

Deprecated since 7.82.0

Closes #10189
2023-01-01 15:42:20 +01:00
Daniel Stenberg
afd0a12f8b
curl_global_sslset.3: clarify the openssl situation
and add rustls

Closes #10188
2023-01-01 15:08:06 +01:00
Cameron Blomquist
99327018cf
http: add additional condition for including stdint.h
stdint.h was only included in http.h when ENABLE_QUIC was defined, but
symbols from stdint.h are also used when USE_NGHTTP2 is defined. This
causes build errors when USE_NGHTTP2 is defined but ENABLE_QUIC is not.

Closes #10185
2023-01-01 00:51:35 +01:00
Daniel Stenberg
becfe2ec78
urldata: cease storing TLS auth type
The only TLS auth type libcurl ever supported is SRP and that is the
default type. Since nobody ever sets any other type, there is no point
in wasting space to store the set type and code to check the type.

If TLS auth is used, SRP is now implied.

Closes #10181
2022-12-31 16:56:21 +01:00