Commit Graph

30778 Commits

Author SHA1 Message Date
Viktor Szakats
c90c78333b
build: streamline non-UWP wincrypt detections
- with CMake, use the variable `WINDOWS_STORE` to detect an UWP build
  and disable our non-UWP-compatible use the Windows crypto API. This
  allows to drop two dynamic feature checks.

  `WINDOWS_STORE` is true when invoking CMake with
  `CMAKE_SYSTEM_NAME` == `WindowsStore`. Introduced in CMake v3.1.

  Ref: https://cmake.org/cmake/help/latest/variable/WINDOWS_STORE.html

- with autotools, drop the separate feature check for `wincrypt.h`. On
  one hand this header has been present for long (even Borland C 5.5 had
  it from year 2000), on the other we used the check result solely to
  enable another check for certain crypto functions. This fails anyway
  with the header not present. We save one dynamic feature check at the
  configure stage.

Reviewed-by: Marcel Raad
Closes #11657
2023-08-13 13:51:19 +00:00
Nicholas Nethercote
a5d260609d
docs/HYPER.md: update hyper build instructions
Nightly Rust and `-Z unstable-options` are not needed.

The instructions here now match the hyper docs exactly:
bd7928f3dd

Closes #11662
2023-08-13 15:50:31 +02:00
Daniel Stenberg
56163e5fd3
RELEASE-NOTES: synced 2023-08-13 15:43:32 +02:00
Daniel Stenberg
c350069f64
urlapi: CURLU_PUNY2IDN - convert from punycode to IDN name
Asssisted-by: Jay Satiro
Closes #11655
2023-08-13 15:34:38 +02:00
Daniel Stenberg
0efe8b215c
spellcheck: adapt to backslashed minuses
As the curl.1 has more backslashed minus, the cleanup sed lines xneed to
adapt.

Adjusted some docs slighly.

Follow-up to 439ff2052e

Closes #11663
2023-08-12 11:10:21 +02:00
Daniel Stenberg
439ff2052e
gen: escape more minus
Detected since it was still hard to search for option names using dashes
in the middle in the man page.

Closes #11660
2023-08-11 20:51:00 +02:00
Daniel Stenberg
00ac47bfaa
cookie-jar.d: enphasize that this option is ONLY writing cookies
Reported-by: Dan Jacobson
Tweaked-by: Jay Satiro
Ref: #11642
Closes #11661
2023-08-11 20:49:36 +02:00
Nicholas Nethercote
686951f7be
docs/HYPER.md: document a workaround for a link error
Closes #11653
2023-08-11 20:05:17 +02:00
Jay Satiro
889c071d3c schannel: verify hostname independent of verify cert
Prior to this change when CURLOPT_SSL_VERIFYPEER (verifypeer) was off
and CURLOPT_SSL_VERIFYHOST (verifyhost) was on we did not verify the
hostname in schannel code.

This fixes KNOWN_BUG 2.8 "Schannel disable CURLOPT_SSL_VERIFYPEER and
verify hostname". We discussed a fix several years ago in #3285 but it
went stale.

Assisted-by: Daniel Stenberg

Bug: https://curl.haxx.se/mail/lib-2018-10/0113.html
Reported-by: Martin Galvan

Ref: https://github.com/curl/curl/pull/3285

Fixes https://github.com/curl/curl/issues/3284
Closes https://github.com/curl/curl/pull/10056
2023-08-11 12:27:18 -04:00
Daniel Stenberg
c7056759be
curl_quiche: remove superfluous NULL check
'stream' is always non-NULL at this point

Pointed out by Coverity

Closes #11656
2023-08-11 11:43:17 +02:00
Daniel Stenberg
e1356f4c45
curl/urlapi.h: tiny typo 2023-08-11 09:17:11 +02:00
Daniel Stenberg
6396c1f893
github/labeler: make HYPER.md set Hyper and not TLS 2023-08-11 08:59:26 +02:00
Daniel Stenberg
b2118da399
docs/cmdline-opts/gen.pl: hide "added in" before 7.50.0
7.50.0 shipped on Jul 21 2016, over seven years ago. We no longer need
to specify version changes for earlier releases in the generated output.

This ups the limit from the previous 7.30.0 (Apr 12 2013)

This hides roughly 35 "added in" mentions.

Closes #11651
2023-08-10 16:26:31 +02:00
Jay Satiro
86b45f6e7e bug_report: require reporters to specify curl and os versions
- Change curl version and os sections from single-line input to
  multi-line textarea.

- Require curl version and os sections to be filled out before report
  can be submitted.

Closes https://github.com/curl/curl/pull/11636
2023-08-10 03:28:36 -04:00
Daniel Stenberg
abd8f2b78b
gen.pl: replace all single quotes with aq
- this prevents man from using a unicode sequence for them
- which then allows search to work properly

Closes #11645
2023-08-09 17:58:35 +02:00
Viktor Szakats
121e60b958
cmake: fix to use variable for the curl namespace
Replace (wrong) literal with a variable to specify the curl
namespace.

Follow-up to 1199308dbc #11505

Reported-by: balikalina on Github
Fixes 1199308dbc (r123923098)
Closes #11629
2023-08-09 12:01:46 +00:00
Viktor Szakats
fc9bfb1452
cmake: allow SHARE_LIB_OBJECT=ON on all platforms
2ebc74c36a #11546 introduced sharing
libcurl objects for shared and static targets.

The above automatically enabled for Windows builds, with an option to
disable with `SHARE_LIB_OBJECT=OFF`.

This patch extend this feature to all platforms as a manual option.
You can enable it by setting `SHARE_LIB_OBJECT=ON`. Then shared objects
are built in PIC mode, meaning the static lib will also have PIC code.

[EXPERIMENTAL]

Closes #11627
2023-08-09 12:01:07 +00:00
Viktor Szakats
fb722ec7e5
cmake: assume wldap32 availability on Windows
This system library first shipped with Windows ME, available as an extra
install for some older releases (according to [1]). The import library
was present already in old MinGW 3.4.2 (year 2007).

Drop the feature check and its associated `HAVE_WLDAP32` variable.

To manually disable `wldap32`, you can use the `USE_WIN32_LDAP=OFF`
CMake option, like before.

[1]: https://dlcdn.apache.org/httpd/binaries/win32/LEGACY.html

Reviewed-by: Jay Satiro
Closes #11624
2023-08-09 12:01:07 +00:00
Daniel Stenberg
3ed637f757
page-header: move up a URL paragraph from GLOBBING to URL 2023-08-09 10:49:36 +02:00
Daniel Stenberg
bca286d9dc
variable.d: output the function names table style
Also correct the url function name in the header

Closes #11641
2023-08-09 10:44:10 +02:00
Daniel Stenberg
fa8265a466
haproxy-clientip.d: remove backticks
This is not markdown

Follow-up to 0a75964d0d

Closes #11639
2023-08-09 10:26:03 +02:00
Daniel Stenberg
b35ef5bbab
RELEASE-NOTES: synced 2023-08-09 09:58:43 +02:00
Daniel Stenberg
6911fec8b2
gen.pl: escape all dashes (ascii minus) to avoid unicode hyphens
Reported-by: FC Stegerman
Fixes #11635
Closes #11637
2023-08-09 09:53:55 +02:00
Daniel Stenberg
a9c444d7f4
cmdline-opts/page-header: reorder, clean up
- removed some unnecessary blurb to focus
- moved up the more important URL details
- put "globbing" into its own subtitle and moved down a little
- mention the online man page in the version section

Closes #11638
2023-08-09 09:53:05 +02:00
Daniel Stenberg
850f6c79e8
c-hyper: adjust the hyper to curlcode conversion
Closes #11621
2023-08-08 23:27:42 +02:00
Daniel Stenberg
06e2fa2b51
test2306: make it use a persistent connection
+ enable verbose already from the start

Closes #11621
2023-08-08 23:27:24 +02:00
eppesuig
a9c1e28160
list-only.d: mention SFTP as supported protocol
Closes #11628
2023-08-08 17:10:29 +02:00
Daniel Stenberg
1bd6d4dee1
request.d: use .TP for protocol "labels"
To render the section nicer in man page.

Closes #11630
2023-08-08 17:08:18 +02:00
Daniel Stenberg
f0fed4e131
cf-haproxy: make CURLOPT_HAPROXY_CLIENT_IP set the *source* IP
... as documented.

Update test 3201 and 3202 accordingly.

Reported-by: Markus Sommer
Fixes #11619
Closes #11626
2023-08-08 17:05:24 +02:00
Daniel Stenberg
d1f41d6ae7
page-footer: QLOGDIR works with ngtcp2 and quiche
It previously said "both" backends which is confusing as we currently
have three...

Closes #11631
2023-08-08 17:04:33 +02:00
Stefan Eissing
d7eafb1d55
http3: quiche, handshake optimization, trace cleanup
- load x509 store after clienthello
- cleanup of tracing

Closes #11618
2023-08-08 16:33:53 +02:00
Daniel Stenberg
9bca45dba8
ngtcp2: remove dead code
'result' is always zero (CURLE_OK) at this point

Detected by Coverity

Closes #11622
2023-08-08 12:29:48 +02:00
Viktor Szakats
00a70cca74
openssl: auto-detect SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
OpenSSL 1.1.1 defines this macro, but no ealier version, or any of the
popular forks (yet). Use the macro itself to detect its presence,
replacing the hard-wired fork-specific conditions.

This way the feature will enable automatically when forks implement it,
while also shorter and possibly requiring less future maintenance.

Follow-up to 94241a9e78 #6721

Reviewed-by: Jay Satiro
Closes #11617
2023-08-08 09:10:04 +00:00
Viktor Szakats
b0bb86c1e9
openssl: use SSL_CTX_set_ciphersuites with LibreSSL 3.4.1
LibreSSL 3.4.1 (2021-10-14) added support for
`SSL_CTX_set_ciphersuites`.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.1-relnotes.txt

Reviewed-by: Jay Satiro
Closes #11616
2023-08-08 09:10:04 +00:00
Viktor Szakats
e43474b472
openssl: use SSL_CTX_set_keylog_callback with LibreSSL 3.5.0
LibreSSL 3.5.0 (2022-02-24) added support for
`SSL_CTX_set_keylog_callback`.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.0-relnotes.txt

Reviewed-by: Jay Satiro
Closes #11615
2023-08-08 09:10:04 +00:00
Viktor Szakats
762740f4e5
cmake: drop HAVE_LIBWINMM and HAVE_LIBWS2_32 feature checks
- `HAVE_LIBWINMM` was detected but unused. The `winmm` system library is
  also not used by curl, but it is by its optional dependency `librtmp`.
  Change the logic to always add `winmm` when `USE_LIBRTMP` is set. This
  library has been available since the early days of Windows.

- `HAVE_LIBWS2_32` detected `ws2_32` lib on Windows. This lib is present
  since Windows 95 OSR2 (AFAIR). Winsock1 already wasn't supported and
  other existing logic already assumed this lib being present, so delete
  the check and replace the detection variable with `WIN32` and always
  add `ws2_32` on Windows.

Closes #11612
2023-08-08 09:10:03 +00:00
Daniel Gustafsson
22eb9893bc
crypto: ensure crypto initialization works
Make sure that context initialization during hash setup works to avoid
going forward with the risk of a null pointer dereference.

Reported-by: Philippe Antoine on HackerOne
Assisted-by: Jay Satiro
Assisted-by: Daniel Stenberg

Closes #11614
2023-08-08 10:44:01 +02:00
Viktor Szakats
bec0c5bbf3
openssl: switch to modern init for LibreSSL 2.7.0+
LibreSSL 2.7.0 (2018-03-21) introduced automatic initialization,
`OPENSSL_init_ssl()` function and deprecated the old, manual init
method, as seen in OpenSSL 1.1.0. Switch to the modern method when
available.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.0-relnotes.txt

Reviewed-by: Daniel Stenberg
Closes #11611
2023-08-07 23:55:58 +00:00
Daniel Stenberg
78d6232f1f
gskit: remove
We remove support for building curl with gskit.

 - 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"

This removal has been advertized in DEPRECATED in Jan 2, 2023 and it has
been mentioned on the curl-library mailing list.

It could be brought back, this is not a ban. Given proper effort and
will, gskit support is welcome back into the curl TLS backend family.

Closes #11460
2023-08-07 20:57:48 +02:00
Daniel Stenberg
08b9f246f4
RELEASE-NOTES: synced 2023-08-07 20:39:32 +02:00
Dan Fandrich
0092e77632 THANKS-filter: add a name typo 2023-08-07 09:12:42 -07:00
Stefan Eissing
199fb4b94a
http3/ngtcp2: shorten handshake, trace cleanup
- shorten handshake timing by delayed x509 store load (OpenSSL)
  as we do for HTTP/2
- cleanup of trace output, align with HTTP/2 output

Closes #11609
2023-08-07 17:13:52 +02:00
Daniel Stenberg
95ca3c53d3
headers: accept leading whitespaces on first response header
This is a bad header fold but since the popular browsers accept this
violation, so does curl now. Unless built with hyper.

Add test 1473 to verify and adjust test 2306.

Reported-by: junsik on github
Fixes #11605
Closes #11607
2023-08-07 12:45:45 +02:00
Daniel Stenberg
cfe85ca562
include/curl/mprintf.h: add __attribute__ for the prototypes
- if gcc or clang is used
- if __STDC_VERSION__ >= 199901L, which means greater than C90
- if not using mingw
- if CURL_NO_FMT_CHECKS is not defined

Closes #11589
2023-08-07 10:46:14 +02:00
Daniel Stenberg
51118ba84c
tests: fix bad printf format flags in test code 2023-08-07 10:46:14 +02:00
Daniel Stenberg
4f3d06ec39
tests: fix header scan tools for attribute edits in mprintf.h 2023-08-07 10:46:13 +02:00
Daniel Stenberg
80ea7f7fc2
cf-socket: log successful interface bind
When the setsockopt SO_BINDTODEVICE operation succeeds, output that in
the verbose output.

Ref: #11599
Closes #11608
2023-08-07 10:42:37 +02:00
Daniel Stenberg
90d0e0f83d
CURLOPT_SSL_VERIFYPEER.3: mention it does not load CA certs when disabled
Ref: #11457
Closes #11606
2023-08-07 10:40:19 +02:00
Daniel Stenberg
03c79448e0
CURLOPT_SSL_VERIFYPEER.3: add two more see also options
CURLINFO_CAINFO and CURLINFO_CAPATH

Closes #11603
2023-08-07 08:25:46 +02:00
Daniel Stenberg
bfc9d56a91
KNOWN_BUGS: aws-sigv4 does not behave well with AWS VPC Lattice
Closes #11007
2023-08-06 23:38:28 +02:00