Commit Graph

1080 Commits

Author SHA1 Message Date
Daniel Stenberg
8e22fc68e7
scripts: move three scripts from lib/ to scripts/
Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
those files in the root Makefile.am

Closes #8625
2022-03-23 15:26:11 +01:00
Daniel Stenberg
ca2c30bcc0
options: remove mistaken space before paren in prototype 2022-03-22 11:09:22 +01:00
Daniel Stenberg
d1e4a67734
header api: add curl_easy_header and curl_easy_nextheader
Add test 1940 to 1946 to verify.

Closes #8593
2022-03-22 08:24:22 +01:00
Daniel Stenberg
eed2e8e257
RELEASE-NOTES: synced
also bump next pending version to become 7.83.0
2022-03-11 08:00:56 +01:00
Daniel Stenberg
6df30a0ec8
RELEASE-NOTES: synced
and bump pending version to 7.82.1
2022-03-07 09:03:36 +01:00
r-a-sattarov
a9a8bad3ed
curl/system.h: update ifdef condition for MCST-LCC compiler
in mcst-lcc compiler => 1.25 added a new macro definition to determine
compiler

Closes #8546
2022-03-06 23:28:54 +01:00
1337vt
d60fa59b91 curl.h: fix typo
Closes https://github.com/curl/curl/pull/8482
2022-02-20 16:15:48 -05:00
Daniel Stenberg
2610142139
lib: remove support for CURL_DOES_CONVERSIONS
TPF was the only user and support for that was dropped.

Closes #8378
2022-02-04 08:05:35 +01:00
Daniel Stenberg
1bf3643f7b
vxworks: drop support
No changes or fixes in vxworks related code since 2009 leads me to
believe that this doesn't work anymore.

Closes #8362
2022-02-01 16:18:39 +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
7422110b48
RELEASE-NOTES: synced
bump next release to become 7.82.0
2022-01-13 22:21:16 +01:00
Daniel Stenberg
7edb0fcf3f
ldap: return CURLE_URL_MALFORMAT for bad URL
For consistency, use the same return code for URL malformats,
independently of what scheme that is used. Previously this would return
CURLE_LDAP_INVALID_URL, but starting now that error cannot be returned.

Closes #8170
2022-01-10 09:37:47 +01:00
Daniel Stenberg
4f443f702d
RELEASE-NOTES: synced
and bump curlver after release
2022-01-05 23:13:49 +01:00
Daniel Stenberg
2b3dd01b77
multi: handle errors returned from socket/timer callbacks
The callbacks were partially documented to support this. Now the
behavior is documented and returning error from either of these
callbacks will effectively kill all currently ongoing transfers.

Added test 530 to verify

Reported-by: Marcelo Juchem
Fixes #8083
Closes #8089
2021-12-06 14:55:52 +01:00
Daniel Stenberg
4183b8fe9a
urlapi: provide more detailed return codes
Previously, the return code CURLUE_MALFORMED_INPUT was used for almost
30 different URL format violations. This made it hard for users to
understand why a particular URL was not acceptable. Since the API cannot
point out a specific position within the URL for the problem, this now
instead introduces a number of additional and more fine-grained error
codes to allow the API to return more exactly in what "part" or section
of the URL a problem was detected.

Also bug-fixes curl_url_get() with CURLUPART_ZONEID, which previously
returned CURLUE_OK even if no zoneid existed.

Test cases in 1560 have been adjusted and extended. Tests 1538 and 1559
have been updated.

Updated libcurl-errors.3 and curl_url_strerror() accordingly.

Closes #8049
2021-11-25 08:36:04 +01:00
Daniel Stenberg
808d839402
RELEASE-NOTES: synced
and bump to 7.81.0-DEV
2021-11-15 10:44:29 +01:00
Patrick Monnerat
b20b364764
mime: use percent-escaping for multipart form field and file names
Until now, form field and file names where escaped using the
backslash-escaping algorithm defined for multipart mails. This commit
replaces this with the percent-escaping method for URLs.

As this may introduce incompatibilities with server-side applications, a
new libcurl option CURLOPT_MIME_OPTIONS with bitmask
CURLMIMEOPT_FORMESCAPE is introduced to revert to legacy use of
backslash-escaping. This is controlled by new cli tool option
--form-escape.

New tests and documentation are provided for this feature.

Reported by: Ryan Sleevi
Fixes #7789
Closes #7805
2021-11-15 10:40:03 +01:00
Daniel Stenberg
eed7473eeb
RELEASE-NOTES: synced
and bump the version to 7.80.1
2021-11-11 09:20:11 +01:00
Jeffrey Tolar
5f563495f1
CURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse
... and close connections that are too old instead of reusing them.

By default, this behavior is disabled.

Bug: https://curl.se/mail/lib-2021-09/0058.html
Closes #7751
2021-10-06 14:38:59 +02:00
Lucas Holt
18480f71be
misc: fix a few issues on MidnightBSD
Closes #7812
2021-10-05 08:35:24 +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
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
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
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
23ca537aa4
RELEASE-NOTES: synced
Bumped curlver to 7.80.0-dev
2021-09-23 13:10:52 +02:00
Daniel Stenberg
9e4298faae
RELEASE-NOTES: synced
and bump to 7.79.1
2021-09-16 10:08:09 +02:00
Daniel Stenberg
d4d53d99b1
mailing lists: move from cool.haxx.se to lists.haxx.se 2021-08-30 09:51:07 +02:00
Daniel Stenberg
fbf26594e3
RELEASE-NOTES: synced
and bump curlver to 7.79.0 for next release
2021-07-29 17:46:32 +02:00
Daniel Stenberg
3a280a19cc
RELEASE-NOTES: synced
bumped to 7.78.1 for next release
2021-07-25 13:33:03 +02:00
Daniel Stenberg
9a7a60dbd1
misc: copyright year range updates 2021-07-19 09:20:58 +02:00
Josh Soref
de1004eb0f
cleanup: spell DoH with a lowercase o
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Closes #7413
2021-07-16 23:53:13 +02:00
Xiang Xiao
cfaa035a0c
curl.h: include sys/select.h for NuttX RTOS
Closes #7287
2021-06-22 14:35:24 +02:00
Bin Meng
2a73b6a3ab
curl.h: remove the execution bit
The execution bit of curl.h file was wrongly added:

  commit 2621025d6f ("curl.h: <sys/select.h> is supported by VxWorks7")

and should be removed.

Follow-up to 2621025d6f ("curl.h: <sys/select.h> is supported by VxWorks7")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Closes #7286
2021-06-22 12:42:57 +02:00
Bin Lan
2621025d6f
curl.h: <sys/select.h> is supported by VxWorks7
Closes #7285
2021-06-22 08:23:11 +02:00
Daniel Stenberg
b67d3ba73e
curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE
They were never officially allowed and slipped in only due to sloppy
parsing. Spaces (ascii 32) should be correctly encoded (to %20) before
being part of a URL.

The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl
allow spaces.

Updated test 1560 to verify.

Closes #7073
2021-06-15 10:49:49 +02:00
Daniel Stenberg
8f717b6cf0
RELEASE-NOTES: synced
... and bump to version 7.78.0 for the next planned release.
2021-06-15 10:08:09 +02:00
Daniel Stenberg
6793332eba
CURLE_SETOPT_OPTION_SYNTAX: new error name for wrong setopt syntax
For options that pass in lists or strings that are subsequently parsed
and must be correct. This broadens the scope for the option previously
known as CURLE_TELNET_OPTION_SYNTAX but the old name is of course still
provided as a #define for existing applications.

Closes #7175
2021-06-02 23:03:55 +02:00
Daniel Stenberg
6043edf3dc
RELEASE-NOTES: synced
... and bump to 7.77.1
2021-05-26 14:47:35 +02:00
Lucas Clemente Vella
84d2839740
CURLOPT_IPRESOLVE: preventing wrong IP version from being used
In some situations, it was possible that a transfer was setup to
use an specific IP version, but due do DNS caching or connection
reuse, it ended up using a different IP version from requested.

This commit changes the effect of CURLOPT_IPRESOLVE from simply
restricting address resolution to preventing the wrong connection
type being used, when choosing a connection from the pool, and
to restricting what addresses could be used when establishing
a new connection.

It is important that all addresses versions are resolved, even if
not used in that transfer in particular, because the result is
cached, and could be useful for a different transfer with a
different CURLOPT_IPRESOLVE setting.

Closes #6853
2021-05-20 16:58:31 +02:00
Gilles Vollant
77fc3859b2 SSL: support in-memory CA certs for some backends
- New options CURLOPT_CAINFO_BLOB and CURLOPT_PROXY_CAINFO_BLOB to
  specify in-memory PEM certificates for OpenSSL, Schannel (Windows)
  and Secure Transport (Apple) SSL backends.

Prior to this change PEM certificates could only be imported from a file
and not from memory.

Co-authored-by: moparisthebest@users.noreply.github.com

Ref: https://github.com/curl/curl/pull/4679
Ref: https://github.com/curl/curl/pull/5677
Ref: https://github.com/curl/curl/pull/6109

Closes https://github.com/curl/curl/pull/6662
2021-05-05 02:29:16 -04:00
ejanchivdorj
94241a9e78
CURLcode: add CURLE_SSL_CLIENTCERT
When a TLS server requests a client certificate during handshake and
none can be provided, libcurl now returns this new error code
CURLE_SSL_CLIENTCERT

Only supported by Secure Transport and OpenSSL for TLS 1.3 so far.

Closes #6721
2021-05-03 17:11:01 +02:00
Martin Halle
e540b32562 version: add gsasl_version to curl_version_info_data
- Add gsasl_version string and bump to CURLVERSION_TENTH.

Ref: https://curl.se/mail/lib-2021-04/0003.html

Closes https://github.com/curl/curl/pull/6843
2021-04-22 18:28:28 -04:00
Jay Satiro
54e7475016 schannel: Disable auto credentials; add an option to enable it
- Disable auto credentials by default. This is a breaking change
  for clients that are using it, wittingly or not.

- New libcurl ssl option value CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl
  to automatically locate and use a client certificate for
  authentication, when requested by the server.

- New curl tool options --ssl-auto-client-cert and
  --proxy-ssl-auto-client-cert map to CURLSSLOPT_AUTO_CLIENT_CERT.

This option is only supported for Schannel (the native Windows SSL
library). Prior to this change Schannel would, with no notification to
the client, attempt to locate a client certificate and send it to the
server, when requested by the server. Since the server can request any
certificate that supports client authentication in the OS certificate
store it could be a privacy violation and unexpected.

Fixes https://github.com/curl/curl/issues/2262
Reported-by: Jeroen Ooms
Assisted-by: Wes Hinsley
Assisted-by: Rich FitzJohn

Ref: https://curl.se/mail/lib-2021-02/0066.html
Reported-by: Morten Minde Neergaard

Closes https://github.com/curl/curl/pull/6673
2021-04-22 16:53:37 -04:00
Daniel Stenberg
ccaaa534d0
RELEASE-NOTES: synced
and bumped curlver to 7.77.0
2021-04-15 08:24:19 +02:00
Daniel Stenberg
77db2a0c6d
typecheck-gcc: make the ssl-ctx-cb check use SSL_CTX pointers
... and not values.

Reported-by: locpyl-tidnyd on github
Fixes #6818
Closes #6819
2021-04-07 00:16:40 +02:00
Daniel Stenberg
f6bbc3407a
RELEASE-NOTES: synced
and bumped to 7.76.1
2021-04-04 23:53:33 +02:00
Viktor Szakats
44872aefc2
http: add support to read and store the referrer header
- add CURLINFO_REFERER libcurl option
- add --write-out '%{referer}' command-line option
- extend --xattr command-line option to fill user.xdg.referrer.url extended
  attribute with the referrer (if there was any)

Closes #6591
2021-02-19 13:57:19 +00:00
Jay Satiro
53022e1893 doh: add options to disable ssl verification
- New libcurl options CURLOPT_DOH_SSL_VERIFYHOST,
  CURLOPT_DOH_SSL_VERIFYPEER and CURLOPT_DOH_SSL_VERIFYSTATUS do the
  same as their respective counterparts.

- New curl tool options --doh-insecure and --doh-cert-status do the same
  as their respective counterparts.

Prior to this change DOH SSL certificate verification settings for
verifyhost and verifypeer were supposed to be inherited respectively
from CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER, but due to a bug
were not. As a result DOH verification remained at the default, ie
enabled, and it was not possible to disable. This commit changes
behavior so that the DOH verification settings are independent and not
inherited.

Ref: https://github.com/curl/curl/pull/4579#issuecomment-554723676

Fixes https://github.com/curl/curl/issues/4578
Closes https://github.com/curl/curl/pull/6597
2021-02-14 18:20:48 -05:00
Daniel Stenberg
9e95105617
RELEASE-NOTES: synced
bumped the version to 7.76.0
2021-02-12 09:55:04 +01:00