Граф коммитов

27721 Коммитов

Автор SHA1 Сообщение Дата
Hayden Roche e12dc2dd97
wolfssl: use for SHA256, MD4, MD5, and setting DES odd parity
Prior to this commit, OpenSSL could be used for all these functions, but
not wolfSSL. This commit makes it so wolfSSL will be used if USE_WOLFSSL
is defined.

Closes #7806
2021-10-02 13:55:31 +02:00
Daniel Stenberg 8bb5f4ddf3
scripts/delta: count command line options in the new file
... which makes the shown delta number wrong until next release.
2021-10-01 08:49:12 +02:00
Daniel Stenberg 147c39b99c
RELEASE-NOTES: synced 2021-10-01 08:46:30 +02:00
Daniel Stenberg 24ffdc8826
print_category: print help descriptions aligned
Adjust the description position to make an aligned column when doing
help listings, which is more pleasing to the eye.

Suggested-by: Gisle Vanem
Closes #7792
2021-10-01 08:35:59 +02:00
Daniel Stenberg 85f91248cf
lib/mk-ca-bundle.pl: skip certs passed Not Valid After date
With this change applied, the now expired 'DST Root CA X3' cert will no
longer be included in the output.

Details: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

Closes #7801
2021-09-30 23:37:55 +02:00
Daniel Stenberg ffb634d4ef
tool_listhelp: easier to generate with gen.pl
tool_listhelp.c is now a separate file with only the command line --help
output, exactly as generated by gen.pl. This makes it easier to generate
updates according to what's in the docs/cmdline-opts docs.

  cd $srcroot/docs/cmdline-opts
  ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c

With a configure build, this also works:

  make -C src listhelp

Closes #7787
2021-09-30 17:50:48 +02:00
Anthony Hu d10a0af2f3
wolfssl: allow setting of groups/curves
In particular, the quantum safe KEM and hybrid curves if wolfSSL is
built to support them.

Closes #7728
2021-09-30 17:28:56 +02:00
Jan Mazur 0fe9018e1a
connnect: use sysaddr_un fron sys/un.h or custom-defined for windows
Closes #7737
2021-09-30 12:27:47 +02:00
Rikard Falkeborn 5de119d0b8 hostip: Move allocation to clarify there is no memleak
By just glancing at the code, it looks like there is a memleak if the
call to Curl_inet_pton() fails. Looking closer, it is clear that the
call to Curl_inet_pton() can not fail, so the code will never leak
memory. However, we can make this obvious by moving the allocation
after the if-statement.

Closes https://github.com/curl/curl/pull/7796
2021-09-30 03:27:46 -04:00
Daniel Stenberg 0b2260b036
gen.pl: make the output date format work better
Follow-up to 15910dfd14

The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
Closes #7793
2021-09-30 09:15:34 +02:00
Daniel Stenberg f870715114
typecheck-gcc.h: add CURLOPT_PREREQDATA awareness
Follow-up to a517378de5

To make test 1912 happy again

Closes #7799
2021-09-30 09:00:37 +02:00
Marcel Raad e2b3f9eaea configure: remove `HAVE_WINSOCK_H` definition
It's not used anymore.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:40 +02:00
Marcel Raad 2bde1774ff CMake: remove `HAVE_WINSOCK_H` definition
It's not used anymore.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:36 +02:00
Marcel Raad 60300291fd config: remove `HAVE_WINSOCK_H` definition
It's not used anymore.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:33 +02:00
Marcel Raad 0259e8c35f lib: remove `HAVE_WINSOCK_H` usage
WinSock v1 is not supported anymore. Exclusively use `HAVE_WINSOCK2_H`
instead.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:31 +02:00
Daniel Stenberg f53b89314d
easyoptions: add the two new PRE* options
Follow-up to a517378de5

Also fix optiontable.pl to do the correct remainder on the entry.

Reported-by: Gisle Vanem
Bug: a517378de5 (commitcomment-57224830)
Closes #7791
2021-09-29 14:48:02 +02:00
Daniel Stenberg 180180a44d
Revert "build: remove checks for WinSock 1"
Due to CI issues

This reverts commit c2ea04f92b.

Closes #7790
2021-09-29 10:42:49 +02:00
Daniel Gustafsson 12246eddc5 lib: avoid fallthrough cases in switch statements
Commit b5a434f7f0 inhibits the warning
on implicit fallthrough cases, since the current coding of indicating
fallthrough with comments is falling out of fashion with new compilers.
This attempts to make the issue smaller by rewriting fallthroughs to no
longer fallthrough, via either breaking the cases or turning switch
statements into if statements.

  lib/content_encoding.c: the fallthrough codepath is simply copied
    into the case as it's a single line.
  lib/http_ntlm.c: the fallthrough case skips a state in the state-
    machine and fast-forwards to NTLMSTATE_LAST. Do this before the
    switch statement instead to set up the states that we actually
    want.
  lib/http_proxy.c: the fallthrough is just falling into exiting the
    switch statement which can be done easily enough in the case.
  lib/mime.c: switch statement rewritten as if statement.
  lib/pop3.c: the fallthrough case skips to the next state in the
    statemachine, do this explicitly instead.
  lib/urlapi.c: switch statement rewritten as if statement.
  lib/vssh/wolfssh.c: the fallthrough cases fast-forwards the state
    machine, do this by running another iteration of the switch
    statement instead.
  lib/vtls/gtls.c: switch statement rewritten as if statement.
  lib/vtls/nss.c: the fallthrough codepath is simply copied into the
    case as it's a single line. Also twiddle a comment to not be
    inside a non-brace if statement.

Closes: #7322
See-also: #7295
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-09-29 10:00:52 +02:00
Marcel Raad 2b7e56aab3
config-win32ce: enable WinSock 2
WinSock 2.2 is supported by Windows CE .NET 4.1 (from 2002, out of
support since 2013).

Ref: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms899586(v=msdn.10)

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:30 +02:00
Marcel Raad 7a0c160473
externalsocket: use WinSock 2.2
That's the only version we support.

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:29 +02:00
Marcel Raad c2ea04f92b
build: remove checks for WinSock 1
It's not supported anymore.

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:27 +02:00
Daniel Stenberg acfe94c08f
scripts/copyright: .muse is .lift now
And update 5 files with old copyright year range
2021-09-28 16:42:18 +02:00
Daniel Stenberg ce6e3e5320
cmdline-opts: made the 'Added:' field mandatory
Since "too old" versions are no longer included in the generated man
page, this field is now mandatory so that it won't be forgotten and then
not included in the documentation.

Closes #7786
2021-09-28 16:20:12 +02:00
Daniel Stenberg ebf18468c0
curl.1: remove mentions of really old version changes
To make the man page more readable, this change removes all references
to changes in support/versions etc that happened before 7.30.0 from the
curl.1 output file. 7.30.0 was released on Apr 12 2013. This particular
limit is a bit arbitrary but was fairly easy to grep for.

It is handled like this: the 'Added' keyword is only used in output if
it refers to 7.30.0 or later. All occurances of "(Added in $VERSION)" in
description will be stripped out if the mentioned $VERSION is from
before 7.30.0. It is therefore important that the "Added in..."
references are always written exactly like that - and on a single line,
not split over two.

This change removes about 80 version number references from curl.1, down
to 138 from 218.

Closes #7786
2021-09-28 16:19:59 +02:00
Daniel Stenberg 6f19f68e93
RELEASE-NOTES: synced 2021-09-28 08:27:24 +02:00
Daniel Stenberg 74e9c7790f
tool_cb_prg: make resumed upload progress bar show better
This is a regression that was *probably* injected in the larger progress
bar overhaul in 2018.

Reported-by: beslick5 on github
Fixes #7760
Closes #7777
2021-09-27 23:17:44 +02:00
Daniel Stenberg 15910dfd14
gen.pl: insert the current date and version in generated man page
Reported-by: Gisle Vanem
Ref: #7780
Closes #7782
2021-09-27 22:35:48 +02:00
Daniel Stenberg 1ddfa8e480
NTLM: use DES_set_key_unchecked with OpenSSL
... as the previously used function DES_set_key() will in some cases
reject using a key that it deems "weak" which will cause curl to
continue using the unitialized buffer content as key instead.

Assisted-by: Harry Sintonen
Fixes #7779
Closes #7781
2021-09-27 22:34:20 +02:00
Marc Hoersken 02c9802fd1
CI: align make and test flags in various config files
1. Use Makefile target to run tests in autotools builds on AppVeyor.
2. Disable testing of SCP protocol on native Windows environments.
3. Remove redundant parameters -a -p from target test-nonflaky.
4. Don't use -vc parameter which is reserved for debugging.

Replaces #7591
Closes #7690
2021-09-27 20:59:29 +02:00
Daniel Stenberg 31692f17c9
mailmap: unify Max! 2021-09-27 17:22:00 +02:00
Max Dymond a517378de5
CURLOPT_PREREQFUNCTION: add new callback
Triggered before a request is made but after a connection is set up

Changes:

- callback: Update docs and callback for pre-request callback
- Add documentation for CURLOPT_PREREQDATA and CURLOPT_PREREQFUNCTION,
- Add redirect test and callback failure test
- Note that the function may be called multiple times on a redirection
- Disable new 2086 test due to Windows weirdness

Closes #7477
2021-09-27 17:16:43 +02:00
Daniel Stenberg 06981ba7f6
KNOWN_BUGS: HTTP/2 connections through HTTPS proxy frequently stall
Closes #6936
2021-09-27 10:05:16 +02:00
Daniel Stenberg c9c1bfb145
TODO: make configure use --cache-file more and better
Closes #7753
2021-09-27 09:50:05 +02:00
Sergey Markelov 4b997626b1
urlapi: support UNC paths in file: URLs on Windows
- file://host.name/path/file.txt is a valid UNC path
  \\host.name\path\files.txt to a non-local file transformed into URI
  (RFC 8089 Appendix E.3)

- UNC paths on other OSs must be smb: URLs

Closes #7366
2021-09-27 08:32:41 +02:00
i-ky 3363eeb262
urlapi: add curl_url_strerror()
Add curl_url_strerror() to convert CURLUcode into readable string and
facilitate easier troubleshooting in programs using URL API.
Extend CURLUcode with CURLU_LAST for iteration in unit tests.
Update man pages with a mention of new function.
Update example code and tests with new functionality where it fits.

Closes #7605
2021-09-27 08:28:46 +02:00
Daniel Stenberg f0b8d1c5f6
RELEASE-NOTES: synced 2021-09-26 23:44:51 +02:00
Mats Lindestam d1e7d9197b
libssh2: add SHA256 fingerprint support
Added support for SHA256 fingerprint in command line curl and in
libcurl.

Closes #7646
2021-09-26 23:20:53 +02:00
Daniel Stenberg 1ca62bb5ce
libcurl.rc: switch out the copyright symbol for plain ASCII
Reported-by: Vitaly Varyvdin
Assisted-by: Viktor Szakats
Fixes #7765
Closes #7776
2021-09-26 23:10:03 +02:00
Jun-ya Kato 4a10a99ef0
ngtcp2: fix QUIC transport parameter version
fix inappropriate version setting for QUIC transport parameters.
this patch keeps curl with ngtcp2 uses QUIC draft version (h3-29).

Closes #7771
2021-09-25 16:06:13 +02:00
Daniel Stenberg 5c4e46c724
examples/imap-append: fix end-of-data check
Reported-by: Alexander Chuykov
Fixes #7774
Closes #7775
2021-09-25 14:47:23 +02:00
Michael Kaufmann 60738f398c vtls: Fix a memory leak if an SSL session cannot be added to the cache
On connection shutdown, a new TLS session ticket may arrive after the
SSL session cache has already been destructed. In this case, the new
SSL session cannot be added to the SSL session cache.

The callers of Curl_ssl_addsessionid() need to know whether the SSL
session has been added to the cache. If it has not been added, the
reference counter of the SSL session must not be incremented, or memory
used by the SSL session must be freed. This is now possible with the new
output parameter "added" of Curl_ssl_addsessionid().

Fixes #7683
Closes #7752
2021-09-24 13:23:42 +02:00
Momoka Yamamoto f4a3ae8ea8
HTTP3.md: use 'autoreconf -fi' instead of buildconf
buildconf is not used since #5853

Closes #7746
2021-09-24 13:16:21 +02:00
Daniel Stenberg dca60077c9
GIT-INFO: rephrase to adapt to s/buildconf/autoreconf 2021-09-24 13:14:52 +02:00
h1zzz ecfc96c9bb
llist: remove redundant code, branch will not be executed
Closes #7770
2021-09-24 12:49:53 +02:00
tlahn 01f63ed62a
HTTP-COOKIES.md: remove duplicate 'each'
Closes #7772
2021-09-24 12:47:03 +02:00
Joel Depooter 739de69ee6 libssh2: Get the version at runtime if possible
Previously this code used a compile time constant, meaning that libcurl
always reported the libssh2 version that libcurl was built with. This
could differ from the libssh2 version actually being used. The new code
uses the CURL_LIBSSH2_VERSION macro, which is defined in ssh.h. The
macro calls the libssh2_version function if it is available, otherwise
it falls back to the compile time version.

Closes https://github.com/curl/curl/pull/7768
2021-09-24 01:41:53 -04:00
Joel Depooter bb72392647 schannel: fix typo
Closes https://github.com/curl/curl/pull/7769
2021-09-24 01:33:11 -04:00
Daniel Stenberg 3455d29d7b
cmake: with OpenSSL, define OPENSSL_SUPPRESS_DEPRECATED
To avoid the "... is deprecated" warnings brought by OpenSSL v3.
(We need to address the underlying code at some point of course.)

Assisted-by: Jakub Zakrzewski
Closes #7767
2021-09-23 23:30:13 +02:00
Daniel Stenberg 7aaf533518
curl-openssl: pass argument to sed single-quoted
... instead of using an escaped double-quote. This is an attempt to make
this work better with ksh that otherwise would insist on a double
escape!

Reported-by: Randall S. Becker
Fixes #7758
Closes #7764
2021-09-23 16:05:28 +02:00
Daniel Stenberg 23ca537aa4
RELEASE-NOTES: synced
Bumped curlver to 7.80.0-dev
2021-09-23 13:10:52 +02:00