Commit Graph

28303 Commits

Author SHA1 Message Date
MAntoniak
16c01bc5a5
mbedtls: enable use of mbedtls without CRL support
Closes #8344
2022-01-28 16:00:23 +01:00
Bernhard Walle
ac55564530
configure: set CURL_LIBRARY_PATH for nghttp2
To execute the test program, we might need the library path so that the
lib is found at runtime.

Closes #8340
2022-01-28 15:55:12 +01:00
Jay Satiro
598b142f6d schannel: restore debug message in schannel_connect_step2
This is a follow-up to recent commit 2218c3a which removed the debug
message to avoid an unused variable warning. The message has been
reworked to avoid the warning.

Ref: https://github.com/curl/curl/pull/8320#issuecomment-1022957904

Closes https://github.com/curl/curl/pull/8336
2022-01-28 02:42:57 -05:00
Jay Satiro
9b8ed6bc3e test3021: disable all msys2 path transformation
- Disable all MSYS2 path transformation in test3021 and test3022.

Prior to this change path transformation in those tests was disabled
only for arguments that start with forward slashes. However arguments
that are in base64 contain forward slashes at any position and caused
unwanted translations.

== Info: Denied establishing ssh session: mismatch sha256 fingerprint.
Remote +/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw= is not equal to
+C:/msys64/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw

In the above example an argument containing a base64 sha256 fingerprint
was passed to curl after MSYS2 translated +/ into +C:/msys64/, and then
the fingerprint didn't match what was expected.

Ref: https://www.msys2.org/wiki/Porting/

Fixes https://github.com/curl/curl/issues/8084
Closes https://github.com/curl/curl/pull/8325
2022-01-28 02:40:16 -05:00
Daniel Stenberg
36e8703a20
CI: move scan-build job from Zuul to Azure Pipelines
Closes #8338
2022-01-27 16:13:38 +01:00
Marcel Raad
610bd89315
openssl: fix ctx_option_t for OpenSSL v3+
The options have been changed to `uint64_t` in
56bd17830f.

Closes https://github.com/curl/curl/pull/8331
2022-01-27 12:22:18 +01:00
Daniel Stenberg
54a3179ebc
CI: move 'distcheck' job from zuul to azure pipelines
Assisted-by: Kushal Das

Closes #8334
2022-01-27 09:33:49 +01:00
Daniel Stenberg
2218c3a57e
vtls: pass on the right SNI name
The TLS backends convert the host name to SNI name and need to use that.
This involves cutting off any trailing dot and lowercasing.

Co-authored-by: Jay Satiro
Closes #8320
2022-01-27 08:36:10 +01:00
Daniel Stenberg
b27ad8e1d3
url: revert the removal of trailing dot from host name
Reverts 5de8d84098 (May 2014, shipped in 7.37.0) and the
follow-up changes done afterward.

Keep the dot in names for everything except the SNI to make curl behave
more similar to current browsers. This means 'name' and 'name.' send the
same SNI for different 'Host:' headers.

Updated test 1322 accordingly

Fixes #8290
Reported-by: Charles Cazabon
Closes #8320
2022-01-27 08:35:18 +01:00
neutric on github
be683243b6
docs/TheArtOfHttpScripting: fix capitalization
Closes #8333
2022-01-26 23:35:03 +01:00
Daniel Stenberg
4bf593a0de
tests/memanalyze.pl: also count and show "total allocations"
This is the total number of bytes allocated, increasing for new
allocations and never reduced when freed. The existing "Maximum
allocated" is the high water mark.

Closes #8330
2022-01-26 14:34:40 +01:00
Daniel Stenberg
e35637f193 mailmap: spellfix githuh => github 2022-01-25 12:05:06 +01:00
Daniel Stenberg
6a2daeeecd
RELEASE-NOTES: synced 2022-01-25 09:27:24 +01:00
Daniel Stenberg
955cb99130
hostcheck: fixed to not touch used input strings
Avoids the need to clone the strings before check, thus avoiding
mallocs, which for cases where there are many SAN names in a cert could
end up numerous.

Closes #8321
2022-01-24 13:55:57 +01:00
Daniel Stenberg
f6dd94f640
ngtcp2: adapt to changed end of headers callback proto
Closes #8322
2022-01-24 13:22:54 +01:00
xkernel
a97eb81d94
openssl: check SSL_get_ex_data to prevent potential NULL dereference
Closes #8268
2022-01-23 10:41:24 +01:00
Jay Satiro
f0fb903cbc md5: check md5_init_func return value
Prior to this change the md5_init_func (my_md5_init) return value was
ignored.

Closes https://github.com/curl/curl/pull/8319
2022-01-23 01:56:59 -05:00
Jay Satiro
0e5c4f574b md5: refactor for standard compliance
- Wrap OpenSSL / wolfSSL MD5 functions instead of taking their function
  addresses during static initialization.

Depending on how curl was built the old way may have used a dllimport
function address during static initialization, which is not standard
compliant, resulting in Visual Studio warning C4232 (nonstandard
extension). Instead the function pointers now point to the wrappers
which call the MD5 functions.

This change only affects OpenSSL and wolfSSL because calls to other SSL
libraries' md5 functions were already wrapped. Also sha256.c already
does this for all SSL libraries.

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

Closes https://github.com/curl/curl/pull/8318
2022-01-23 01:45:46 -05:00
lucas
519b62ccd0
docs: update IETF links to use datatracker
The tools.ietf.org domain has been deprecated a while now, with the
links being redirected to datatracker.ietf.org.

Rather than make people eat that redirect time, this change switches the
URL to a more canonical source.

Closes #8317
2022-01-21 23:06:36 +01:00
Harry Sarson
6c82e3f42d
CI: test building wolfssl with --enable-opensslextra
Closes #8315
2022-01-21 23:04:15 +01:00
Harry Sarson
392fdb0438
misc: allow curl to build with wolfssl --enable-opensslextra
put all #include of openssl files behind wolfssl ifdefs so that we can
use the wolfssl/ prefixed include paths. Without these curl only builds
when wolfssl is built with enable-all.

Fixes #8292
Closes #8315
2022-01-21 23:04:02 +01:00
Lucas Pardue
8a3e67e732
quiche: change qlog file extension to .sqlog
quiche has just switched it's qlog serialization format to JSON-SEQ by
default . The spec says this SHOULD use `.sqlog` extension.

I believe ngtcp2 also supports JSON-SEQ by default as of
9baf06fc3f

Let's update curl so that tools know what format we are using!

Closes #8316
2022-01-21 22:34:57 +01:00
Jay Satiro
f74b6d8551 projects: Fix Visual Studio wolfSSL configurations
- Change build-wolfssl.bat to disable SSLv3, enable TLSv1.3, enable
  wolfSSL_DES_ecb_encrypt (needed by NTLM) and enable alt cert chains.

- Disable warning C4214 'bit field types other than int'.

- Add include directory wolfssl\wolfssl.

wolfSSL offers OpenSSL API compatibility that libcurl uses, and some
recent change in libcurl included an include file for wolfSSL like
openssl/foo.h, which has a path like wolfssl\wolfssl\openssl\foo.h.

The include directory issue was reported in #8292 but it's currently
unclear whether this type of change is needed for other build systems.

Bug: https://github.com/curl/curl/issues/8292
Reported-by: Harry Sarson

Closes https://github.com/curl/curl/pull/8298
2022-01-21 03:22:06 -05:00
Daniel Stenberg
d03cb7c14a
openssl: return error if TLS 1.3 is requested when not supported
Previously curl would just silently ignore it if the necessary defines
are not present at build-time.

Reported-by: Stefan Eissing
Fixes #8309
Closes #8310
2022-01-21 08:44:17 +01:00
Daniel Stenberg
e29665c775
TODO: Passing NOTIFY option to CURLOPT_MAIL_RCPT
Closes #8232
2022-01-20 11:29:43 +01:00
pheiduck on githuh
f558534e22
workflows/wolfssl: install impacket
needed Python Package for SMB tests

Closes #8307
2022-01-20 11:22:52 +01:00
Daniel Stenberg
e74a6b7b72
url: make Curl_disconnect return void
1. The function would only ever return CURLE_OK anyway
 2. Only one caller actually used the return code
 3. Most callers did (void)Curl_disconnect()

Closes #8303
2022-01-20 09:07:30 +01:00
Daniel Stenberg
cdb495f743
docs: document HTTP/2 not insisting on TLS 1.2
Both for --http2 and CURLOPT_HTTP_VERSION.

Reported-by: jhoyla on github
Fixes #8235
Closes #8300
2022-01-19 23:30:07 +01:00
Daniel Stenberg
fde0925214
cmdline-opts/gen.pl: fix option matching to improve references
Previously it could mistakenly match partial names when there are
options that start with the same prefix, leading to the wrong references
used.

Closes #8299
2022-01-19 13:29:28 +01:00
Daniel Stenberg
0c2694f22f
TODO: Less memory massaging with Schannel 2022-01-19 11:59:53 +01:00
Patrick Monnerat
52826d3b79
runtests.pl: disable debuginfod
Valgrind and gdb implement this feature: as this highly slows down tests,
disable it.

Closes #8291
2022-01-17 22:26:52 +01:00
Daniel Stenberg
39b24a1183
RELEASE-NOTES: synced 2022-01-17 16:49:00 +01:00
Daniel Stenberg
c24764ef59
CURLMOPT_TIMERFUNCTION/DATA.3: fix the examples
... to not call libcurl recursively back.

Closes #8286
2022-01-17 16:45:28 +01:00
Daniel Stenberg
340bb1905f
multi: set in_callback for multi interface callbacks
This makes most libcurl functions return error if called from within a
callback using the same multi handle. For example timer or socket
callbacks calling curl_multi_socket_action.

Reported-by: updatede on github
Fixes #8282
Closes #8286
2022-01-17 16:44:45 +01:00
Daniel Stenberg
a3d2eeab01
docs/HISTORY.md: mention alt-svc and HSTS 2022-01-17 15:56:41 +01:00
Daniel Stenberg
f6088822ce
misc: remove the final watcom references
Follow-up to bbf8cae44d

We removed support for the watcom builds files back in September
2020. This removes all remaining watcom references and ifdefs.

Closes #8287
2022-01-17 08:49:25 +01:00
Daniel Stenberg
90dd1fc664
misc: remove BeOS code and references
There has not been a mention of this OS in any commit since December
2004 (58f4af7973). The OS is also long gone.

Closes #8288
2022-01-17 08:47:23 +01:00
Daniel Stenberg
0041fe7ef5
tool_getparam: DNS options that need c-ares now fail without it
Just silently accepting the options and then not having any effect is
not good.

Ref: #8283
Closes #8285
2022-01-17 08:44:41 +01:00
Daniel Stenberg
f974bee623
curl: remove "separators" (when using globbed URLs)
Unless muted (with -s) When doing globbing, curl would output mime-like
separators between the separate transfers. This is not documented
anywhere, surprises users and clobbers the output. Gone now.

Updated test 18 and 1235

Reported-by: jonny112 on github
Bug: https://github.com/curl/curl/discussions/8257
Closes #8278
2022-01-15 23:41:28 +01:00
Niels Martignène
6c084fd47c mbedtls: fix CURLOPT_SSLCERT_BLOB (again)
- Increase the buffer length passed to mbedtls_x509_crt_parse to account
  for the null byte appended to the temporary blob.

Follow-up to 867ad1c which uses a null terminated copy of the
certificate blob, because mbedtls_x509_crt_parse requires PEM data
to be null terminated.

Ref: https://github.com/curl/curl/commit/867ad1c#r63439893
Ref: https://github.com/curl/curl/pull/8146

Closes https://github.com/curl/curl/pull/8260
2022-01-15 16:57:36 -05:00
Alessandro Ghedini
3aee3612b4
quiche: verify the server cert on connect
Similarly to c148f0f551, make quiche correctly acknowledge
`CURLOPT_SSL_VERIFYPEER` and `CURLOPT_SSL_VERIFYHOST`.

Fixes #8173
Closes #8275
2022-01-15 17:47:00 +01:00
Ikko Ashimine
7053c9138f
checksrc: fix typo in comment
enfore -> enforce

Closes #8281
2022-01-15 17:23:46 +01:00
Daniel Stenberg
66250c4d51
curl-openssl: remove the OpenSSL headers and library versions check
It is more work to maintain that check than the (any?) benefit it
brings.

Fixes #8279
Reported-by: Satadru Pramanik
Closes #8280
2022-01-15 16:02:23 +01:00
Daniel Stenberg
84853d94f2
mqtt: free any leftover when done
Oss-fuzz found an issue when the "sendleftovers" pointer could leak memory.
Fix this by always freeing it (if still assigned) in the done function.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43515
Closes #8274
2022-01-13 23:09:14 +01:00
Daniel Stenberg
8188ca91eb
formdata: avoid size_t => long typecast overflows
Typically a problem for platforms with 32 bit long and 64 bit size_t

Reported-by: Fabian Yamaguchi
Bug: https://hackerone.com/reports/1444539
Closes #8272
2022-01-13 23:07:52 +01:00
Daniel Stenberg
7422110b48
RELEASE-NOTES: synced
bump next release to become 7.82.0
2022-01-13 22:21:16 +01:00
Marcel Raad
7740600015 build: enable -Warith-conversion
This makes the behavior consistent between GCC 10 and earlier versions.

Closes https://github.com/curl/curl/pull/8271
2022-01-13 16:23:07 +01:00
Marcel Raad
813c984962 build: fix -Wenum-conversion handling
Don't enable that warning when warnings are disabled.
Also add it to CMake.

Closes https://github.com/curl/curl/pull/8271
2022-01-13 16:23:03 +01:00
Marcel Raad
c07a71e74f appveyor: use VS 2017 image for the autotools builds
The newer images don't have all required MSYS2 packages.

Fixes https://github.com/curl/curl/issues/8248
Closes https://github.com/curl/curl/pull/8265
2022-01-12 11:10:22 +01:00
Marcel Raad
51df1c8e3e appveyor: update images from VS 2019 to 2022
Closes https://github.com/curl/curl/pull/8265
2022-01-12 11:10:22 +01:00