Commit Graph

29600 Commits

Author SHA1 Message Date
Daniel Stenberg
0bf8b796a0
tool_operate: share HSTS between handles 2022-12-27 15:22:01 +01:00
Daniel Stenberg
076a2f6291
share: add sharing of HSTS cache among handles
Closes #10138
2022-12-27 15:22:01 +01:00
Viktor Szakats
692c73707a
Makefile.mk: fix wolfssl and mbedtls default paths
Fix the defaults for `WOLFSSL_PATH` and `MBEDTLS_PATH` to have
meaningful values instead of the copy-pasted wrong ones.

Ref: 66e68ca47f (r94275172)

Reported-by: Ryan Schmidt
Closes #10164
2022-12-27 11:36:03 +00:00
Daniel Stenberg
9566372a8d
INTERNALS: cleanup
- remove "operating systems" (mostly outdated)

- upodate the "build tools"

Closes #10162
2022-12-27 10:54:03 +01:00
Daniel Stenberg
dfbe035c8b
cmake: bump requirement to 3.7
Because this is the cmake version (released in November 2016) that
introduced GREATER_EQUAL, which is used already.

Reported-by: nick-telia on github
Fixes #10128
Closes #10161
2022-12-27 10:52:34 +01:00
Daniel Stenberg
728400f875
cfilters:Curl_conn_get_select_socks: use the first non-connected filter
When there are filters addded for both socket and SSL, the code
previously checked the SSL sockets during connect when it *should* first
check the socket layer until that has connected.

Fixes #10157
Fixes #10146
Closes #10160

Reviewed-by: Stefan Eissing
2022-12-27 10:48:29 +01:00
Daniel Stenberg
901392cbb7
urlapi: add CURLU_PUNYCODE
Allows curl_url_get() get the punycode version of host names for the
host name and URL parts.

Extend test 1560 to verify.

Closes #10109
2022-12-26 23:29:23 +01:00
Daniel Stenberg
cf174810db
RELEASE-NOTES: synced 2022-12-26 10:56:49 +01:00
Daniel Stenberg
ccf1ca9430
libssh2: try sha2 algos for hostkey methods
As is supported by recent libssh2, but should just be ignored by older
versions.

Reported-by: norbertmm on github
Assisted-by: norbertmm on github
Fixes #10143
Closes #10145
2022-12-26 10:15:48 +01:00
Patrick Monnerat
e2aed00430
typecheck: accept expressions for option/info parameters
As expressions can have side effects, evaluate only once.

To enable deprecation reporting only once, get rid of the __typeof__
use to define the local temporary variable and use the target type
(CURLoption/CURLINFO). This also avoids multiple reports on type
conflicts (if some) by the curlcheck_* macros.

Note that CURLOPT_* and CURLINFO_* symbols may be deprecated, but not
their values: a curl_easy_setopt call with an integer constant as option
will never report a deprecation.

Reported-by: Thomas Klausner
Fixes #10148
Closes #10149
2022-12-26 10:04:55 +01:00
Paul Howarth
ef07452a5c
tests: avoid use of sha1 in certificates
The SHA-1 algorithm is deprecated (particularly for security-sensitive
applications) in a variety of OS environments. This already affects
RHEL-9 and derivatives, which are not willing to use certificates using
that algorithm. The fix is to use sha256 instead, which is already used
for most of the other certificates in the test suite.

Fixes #10135

This gets rid of issues related to sha1 signatures.

Manual steps after "make clean-certs" and "make build-certs":

- Copy tests/certs/stunnel-sv.pem to tests/stunnel.pem
  (make clean-certs does not remove the original tests/stunnel.pem)

- Copy tests/certs/Server-localhost-sv.pubkey-pinned into --pinnedpubkey
  options of tests/data/test2041 and tests/data/test2087

Closes #10153
2022-12-26 09:47:43 +01:00
Yurii Rashkovskii
5ee81c3963
cmake: fix the snprintf detection
I haven't had the time to check other configurations, but on my macOS
Ventura 13.1 with XCode 14.2 cmake does not find `snprintf`.

Solution: ensure stdio.h is checked for definitions

Closes #10155
2022-12-26 09:32:37 +01:00
Radu Hociung
73477d5a4d
http: remove the trace message "Mark bundle... multiuse"
The message "Mark bundle as not supporting multiuse" was added at commit
29364d93 when an http/2-related bug was fixed, and it appears to be a
leftover trace message.

This message should be removed because:
 * it conveys no information to the user
 * it is enabled in the default build (--enable-verbose)
 * it reads like a warning/unexpected condition
 * it is equivalent to "Detected http proto < 2", which is
   not a useful message.
 * it is a time-wasting red-herring for anyone who encounters
   it for the first time while investigating some other, real
   problem.

This commit removes the trace message "Mark bundle as not
supporting multiuse"

Closes #10159
2022-12-26 09:29:36 +01:00
Hannah Schierling
a5cf4a87cf
url: fix build with --disable-cookies
Struct `UserDefined` has no member `cookielist` if
`CURL_DISABLE_COOKIES` is defined.

Follow-up to af5999a

Closes #10158
2022-12-26 09:27:39 +01:00
Stefan Eissing
4ab601d93a
runtests: also tear down http2/http3 servers when https server is stopped
Closes #10114
2022-12-23 08:56:53 +01:00
Stefan Eissing
c7fb341c0e
tests: add 3 new HTTP/2 test cases, plus https: support for nghttpx
- a simple https get
- a simple https post
- a multi get of 4 requests and check that same connection was used

Closes #10114
2022-12-23 08:56:53 +01:00
Daniel Stenberg
db07301fbb
urldata: remove unused struct fields, made more conditional
- source_quote, source_prequote and source_postquote have not been used since
  5e0d9aea3; September 2006

- make several fields conditional on proxy support

- make three quote struct fields conditional on FTP || SSH

- make 'mime_options' depend on MIME

- make trailer_* fields depend on HTTP

- change 'gssapi_delegation' from long to unsigned char

- make 'localportrange' unsigned short instead of int

- conn->trailer now depends on HTTP

Closes #10147
2022-12-23 08:45:05 +01:00
Daniel Stenberg
f4883ba966
urldata: make set.http200aliases conditional on HTTP being present
And make a few SSH-only fields depend on SSH

Closes #10140
2022-12-22 23:07:46 +01:00
Daniel Stenberg
aef4dc892d
md4: fix build with GnuTLS + OpenSSL v1
Reported-by: Esdras de Morais da Silva

Fixes #10110
Closes #10142
2022-12-22 23:06:46 +01:00
Daniel Stenberg
31b9a32260
urldata: make 'ftp_create_missing_dirs' depend on FTP || SFTP
Closes #10139
2022-12-22 23:04:47 +01:00
John Bampton
80efd3bc61
misc: fix grammar and spelling
Closes #10137
2022-12-22 18:07:07 +01:00
Daniel Stenberg
af5999a674
urldata: move the cookefilelist to the 'set' struct
The cookiefile entries are set into the handle and should remain set for
the lifetime of the handle so that duplicating it also duplicates the
list. Therefore, the struct field is moved from 'state' to 'set'.

Fixes #10133
Closes #10134
2022-12-22 16:06:37 +01:00
Daniel Stenberg
e4505a1915
strdup: name it Curl_strdup
It does not belong in the curlx_ name space as it is never used
externally.

Closes #10132
2022-12-22 14:31:37 +01:00
Nick Banks
72b819f147
msh3: update to v0.5 Release
Closes #10125
2022-12-22 14:29:40 +01:00
andy5995
3736c0a209
workflows/linux.yml: merge 3 common packages
Closes #10071
2022-12-22 08:59:08 +01:00
Daniel Stenberg
ee583c68d4
docs: mention indirect effects of --insecure
Warn users that disabling certficate verification allows servers to
"pollute" curl with data it trusts.

Reported-by: Harry Sintonen
Closes #10126
2022-12-21 23:36:58 +01:00
Daniel Stenberg
07dfbc08bf
SECURITY-PROCESS.md: document severity levels
Closes #10118
2022-12-21 16:26:35 +01:00
Daniel Stenberg
5d0cad97a6
RELEASE_NOTES: synced
bumped version for new cycle
2022-12-21 15:38:50 +01:00
Marcel Raad
03ac7ab4ad
tool_operate: fix CURLOPT_SOCKS5_GSSAPI_NEC type
`CURLOPT_SOCKS5_GSSAPI_NEC` is a long, while `socks5_gssapi_nec` was
made a bool in commit 4ac64eadf6.

Closes https://github.com/curl/curl/pull/10124
2022-12-21 15:37:54 +01:00
Daniel Stenberg
c12fb3ddaf
RELEASE-NOTES: synced
The curl 7.87.0 release
2022-12-21 08:00:59 +01:00
Daniel Stenberg
26959cb74c
THANKS: 40 new contributors from 7.87.0 2022-12-21 08:00:59 +01:00
Daniel Stenberg
565d0ca2b1
http: fix the ::1 comparison for IPv6 localhost for cookies
When checking if there is a "secure context", which it is if the
connection is to localhost even if the protocol is HTTP, the comparison
for ::1 was done incorrectly and included brackets.

Reported-by: BratSinot on github

Fixes #10120
Closes #10121
2022-12-20 13:50:15 +01:00
Philip H
5f5660f3a0 CI/spell: actions/checkout@v2 > actions/checkout@v3 2022-12-19 23:15:07 +00:00
Daniel Stenberg
4f20188ac6
smb/telnet: do not free the protocol struct in *_done()
It is managed by the generic layer.

Reported-by: Trail of Bits

Closes #10112
2022-12-19 12:33:19 +01:00
Daniel Stenberg
9e71901634
http: use the IDN decoded name in HSTS checks
Otherwise it stores the info HSTS into the persistent cache for the IDN
name which will not match when the HSTS status is later checked for
using the decoded name.

Reported-by: Hiroki Kurosawa

Closes #10111
2022-12-19 11:04:15 +01:00
Daniel Stenberg
46441955bf
CURLOPT_DEBUGFUNCTION.3: emphasize that incoming data is "raw"
Closes #10106
2022-12-16 15:02:38 +01:00
Xì Gà
6cc18802f8
socks: fix username max size is 255 (0xFF)
Closes #10105

Reviewed-by: Daniel Gustafsson
2022-12-16 15:01:05 +01:00
Daniel Stenberg
66f4d50fa6
limit-rate.d: see also --rate 2022-12-16 10:31:13 +01:00
Daniel Stenberg
b151faa083
lib1560: add some basic IDN host name tests
Closes #10094
2022-12-15 22:57:08 +01:00
Daniel Stenberg
cc0aaf6e82
idn: rename the files to idn.[ch] and hold all IDN functions
Closes #10094
2022-12-15 22:56:58 +01:00
Daniel Stenberg
301812bec2
idn: remove Curl_win32_ascii_to_idn
It was not used. Introduce a new IDN header for the prototype(s).

Closes #10094
2022-12-15 22:56:52 +01:00
Daniel Stenberg
590ecb6de5
RELEASE-NOTES: synced 2022-12-15 16:35:18 +01:00
Daniel Stenberg
6f40703ba0
curl_url_get.3: remove spurious backtick
Put there by mistake.

Follow-up from 9a8564a92

Closes #10101
2022-12-15 15:56:26 +01:00
Daniel Stenberg
50e781d3ec
socks: fix infof() flag for outputing a char
It used to be a 'long', %lu is no longer correct.

Follow-up to 57d2d9b6be
Detected by Coverity CID 1517663

Closes #10100
2022-12-15 15:52:17 +01:00
Daniel Stenberg
50750d097a
ssl-reqd.d: clarify that this is for upgrading connections only
Closes #10093
2022-12-15 14:36:37 +01:00
Daniel Stenberg
af0924210b
curl_url_set.3: document CURLU_DISALLOW_USER
Closes #10099
2022-12-15 12:38:57 +01:00
Daniel Stenberg
5de6848f10
cmake: set the soname on the shared library
Set SONAME and VERSION for platforms we think this works on. Remove
issue from KNOWN_BUGS.

Assisted-by: Jakub Zakrzewski

Closes #10023
2022-12-15 12:36:25 +01:00
Daniel Stenberg
614f78131a
tool_paramhlp: free the proto strings on exit
And also make sure that repeated use of the options free the previous
string before it stores a new.

Follow-up from e6f8445ede

Closes #10098
2022-12-15 08:28:38 +01:00
Daniel Stenberg
24d494c264
tool_cfgable: free the ssl_ec_curves on exit
Follow-up to ede125b7b

Closes #10097
2022-12-15 08:26:04 +01:00
Daniel Stenberg
c20b35ddae
urlapi: reject more bad letters from the host name: &+()
Follow-up from eb0167ff7d

Extend test 1560 to verify

Closes #10096
2022-12-15 08:23:48 +01:00