1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

1433 Commits

Author SHA1 Message Date
Johannes Schindelin
1328f69d53
vtls: introduce curl_global_sslset()
Let's add a compile time safe API to select an SSL backend. This
function needs to be called *before* curl_global_init(), and can be
called only once.

Side note: we do not explicitly test that it is called before
curl_global_init(), but we do verify that it is not called multiple times
(even implicitly).

If SSL is used before the function was called, it will use whatever the
CURL_SSL_BACKEND environment variable says (or default to the first
available SSL backend), and if a subsequent call to
curl_global_sslset() disagrees with the previous choice, it will fail
with CURLSSLSET_TOO_LATE.

The function also accepts an "avail" parameter to point to a (read-only)
NULL-terminated list of available backends. This comes in real handy if
an application wants to let the user choose between whatever SSL backends
the currently available libcurl has to offer: simply call

	curl_global_sslset(-1, NULL, &avail);

which will return CURLSSLSET_UNKNOWN_BACKEND and populate the avail
variable to point to the relevant information to present to the user.

Just like with the HTTP/2 push functions, we have to add the function
declaration of curl_global_sslset() function to the header file
*multi.h* because VMS and OS/400 require a stable order of functions
declared in include/curl/*.h (where the header files are sorted
alphabetically). This looks a bit funny, but it cannot be helped.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-08-28 14:56:59 +02:00
Daniel Stenberg
4a7673c8ca
CURLOPT_USERPWD.3: see also CURLOPT_PROXYUSERPWD 2017-08-24 10:09:28 +02:00
Daniel Stenberg
582f2a1308
CURLOPT_SSH_COMPRESSION.3: enable with 1L
(leaves other values reserved for the future)
2017-08-17 09:54:07 +02:00
Viktor Szakats
b7b4dc0d49 ssh: add the ability to enable compression (for SCP/SFTP)
The required low-level logic was already available as part of
`libssh2` (via `LIBSSH2_FLAG_COMPRESS` `libssh2_session_flag()`[1]
option.)

This patch adds the new `libcurl` option `CURLOPT_SSH_COMPRESSION`
(boolean) and the new `curl` command-line option `--compressed-ssh`
to request this `libssh2` feature. To have compression enabled, it
is required that the SSH server supports a (zlib) compatible
compression method and that `libssh2` was built with `zlib` support
enabled.

[1] https://www.libssh2.org/libssh2_session_flag.html

Ref: https://github.com/curl/curl/issues/1732
Closes https://github.com/curl/curl/pull/1735
2017-08-17 03:32:00 -04:00
Alessandro Ghedini
a6fdf11771
docs: fix typo funtion -> function
Closes #1770
2017-08-12 14:56:37 +02:00
Alessandro Ghedini
34f24fef4a docs: fix grammar in CURL_SSLVERSION_MAX_DEFAULT description 2017-08-12 13:36:39 +01:00
Alessandro Ghedini
274f9cac96 docs: fix typo stuct -> struct 2017-08-12 13:33:10 +01:00
Daniel Stenberg
a7bbbb7c36
make install: add 8 missing man pages to the installation 2017-08-09 11:31:10 +02:00
Viktor Szakats
13ef623a81
docs/comments: Update to secure URL versions
Closes #1741
2017-08-08 21:41:07 +02:00
Daniel Stenberg
70934885d0 CURLOPT_NETRC.3: fix typo in 7e48aa3861
Reported-by: Viktor Szakats
2017-08-02 15:29:27 +02:00
Daniel Stenberg
7e48aa3861 CURLOPT_NETRC.3: mention the file name on windows
... and CURLOPT_NETRC_FILE(3).
2017-08-02 14:34:26 +02:00
Daniel Stenberg
bbc9c6d144 CURLOPT_POSTFIELDS.3: explain the 100-continue magic better 2017-07-07 12:43:17 +02:00
Daniel Stenberg
a126ca8481 curl_easy_escape.3: mention the (lack of) encoding
Fixes #1612
Reported-by: Jeroen Ooms
2017-07-07 10:47:46 +02:00
Daniel Stenberg
ef2a9f22cc curl_strequal.3: fix typo in SYNOPSIS
Reported-by: Jesse Chisholm

Fixes #1623
2017-06-29 01:16:56 +02:00
Kamil Dudka
8924f58c37 CURLOPT_SOCKS5_AUTH: allowed methods for SOCKS5 proxy auth
If libcurl was built with GSS-API support, it unconditionally advertised
GSS-API authentication while connecting to a SOCKS5 proxy.  This caused
problems in environments with improperly configured Kerberos: a stock
libcurl failed to connect, despite libcurl built without GSS-API
connected fine using username and password.

This commit introduces the CURLOPT_SOCKS5_AUTH option to control the
allowed methods for SOCKS5 authentication at run time.

Note that a new option was preferred over reusing CURLOPT_PROXYAUTH
for compatibility reasons because the set of authentication methods
allowed by default was different for HTTP and SOCKS5 proxies.

Bug: https://curl.haxx.se/mail/lib-2017-01/0005.html
Closes https://github.com/curl/curl/pull/1454
2017-06-28 08:02:58 +02:00
Daniel Stenberg
924cd3e25b CURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case
... supported since 7.54.1
2017-06-24 00:59:10 +02:00
Daniel Stenberg
9b167fd090 --request-target: instead of --strip-path-slash
... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH.

This option instead provides the full "alternative" target to use in the
request, instead of extracting the path from the URL.

Test 1298 and 1299 updated accordingly.

Idea-by: Evert Pot
Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373

Closes #1593
2017-06-21 23:39:10 +02:00
Daniel Stenberg
b778ae4c5e http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASH
... to enable sending "OPTIONS *" which wasn't possible previously.

This option currently only works for HTTP.

Added test cases 1298 + 1299 to verify

Fixes #1280
Closes #1462
2017-06-19 16:39:22 +02:00
Daniel Stenberg
3b80d3ca46 getinfo: return sizes as curl_off_t
This change introduces new alternatives for the existing six
curl_easy_getinfo() options that return sizes or speeds as doubles. The
new versions are named like the old ones but with an appended '_T':

CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
CURLINFO_CONTENT_LENGTH_UPLOAD_T
CURLINFO_SIZE_DOWNLOAD_T
CURLINFO_SIZE_UPLOAD_T
CURLINFO_SPEED_DOWNLOAD_T
CURLINFO_SPEED_UPLOAD_T

Closes #1511
2017-06-19 09:27:42 +02:00
Daniel Stenberg
7b3b4722be CURLOPT_PREQUOTE.3: spellfix man page reference 2017-06-18 17:06:51 +02:00
Daniel Stenberg
8bc9cabd7f TODO: implement support for CURLOPT_PREQUOTE with SFTP
... also updated the CURLOPT_PREQUOTE.3 man page to mention the correct
protocol support.

Closes #1514
2017-06-18 00:25:09 +02:00
Daniel Stenberg
5113ad0424 http-proxy: do the HTTP CONNECT process entirely non-blocking
Mentioned as a problem since 2007 (8f87c15bda) and of course it
existed even before that.

Closes #1547
2017-06-14 23:43:52 +02:00
Daniel Stenberg
5fe4f78902 typecheck-gcc.h: separate getinfo slist checks from other pointers
Fixes #1524
2017-06-01 21:06:09 +02:00
Daniel Stenberg
aae4a4788a CURLOPT_SSH_KEY*.3: typos
Reported-by: Gisle Vanem
2017-05-31 13:52:03 +02:00
Daniel Stenberg
399a1a6182 CURLOPT_STREAM_DEPENDS.3: typo 2017-05-31 13:39:56 +02:00
Daniel Stenberg
f072393feb CURLOPT_FNMATCH_FUNCTION.3: also modified example to avoid fcpp issues 2017-05-31 13:36:51 +02:00
Daniel Stenberg
28baf380fa CURLOPT_FNMATCH_DATA.3: modified example to avoid fcpp issues 2017-05-31 13:30:04 +02:00
Daniel Stenberg
4600362a5a opts: more than 100 more examples for man pages... 2017-05-31 11:56:53 +02:00
Daniel Stenberg
a6ad28a75e CURLOPT_PROXY.3: fix test 1140 breakage 2017-05-31 08:45:36 +02:00
Daniel Stenberg
bb1a8c174b opts: more examples added to man pages 2017-05-30 23:35:30 +02:00
Daniel Stenberg
2d5fa35e85 docs: clarify NO_PROXY further
Fixes #1208
2017-05-30 22:43:34 +02:00
Daniel Stenberg
dd97551746 CURLOPT_PROXY.3: describe the environment variables more 2017-05-30 18:05:33 +02:00
Daniel Stenberg
c2227dae53 opts: more examples added in option man pages 2017-05-27 23:11:26 +02:00
Phil Crump
a9de0a9f54 docs/CURLOPT_SSLVERSION.3: Correct define name in example
Closes #1509
2017-05-25 16:28:30 +02:00
eb16305e6a SecureTransport/DarwinSSL: Implement public key pinning
Closes #1400
2017-05-15 22:54:33 +02:00
Daniel Stenberg
1919569633 man pages: fix example syntax errors
follow-up to 5ddad099b4
2017-05-15 13:01:15 +02:00
Daniel Stenberg
5ddad099b4 docs/libcurl/opts: added more examples in man pages 2017-05-15 11:45:19 +02:00
Daniel Stenberg
e366ca2b85 CURLOPT_HTTPPROXYTUNNEL: clarify, add example 2017-05-15 10:11:23 +02:00
Dan Fandrich
d836c9fee4 url.c: add a compile-time check that CURL_MAX_WRITE_SIZE is large enough
Some code (e.g. Curl_fillreadbuffer) assumes that this buffer is not
exceedingly tiny and will break if it is. This same check is already
done at run time in the CURLOPT_BUFFERSIZE option.
2017-05-13 23:21:27 +02:00
Daniel Stenberg
289236b223 opts: fix bad example formatting \n => \\n
...to render properly nroff.
2017-05-06 23:51:29 +02:00
Daniel Stenberg
271c63748a opts: examples added to 8 more libcurl option man pages 2017-05-06 23:38:39 +02:00
Daniel Stenberg
2b7bde4d3f docs/opts: 24 more man pages now have examples 2017-05-05 17:26:08 +02:00
Daniel Stenberg
58a6265a40 docs/opts: 23 more man pages now have examples 2017-05-05 16:30:23 +02:00
Daniel Stenberg
22fdb0954c tests/server: run checksrc by default in debug-builds 2017-05-05 15:51:25 +02:00
Daniel Stenberg
9b47f67929 curl_slist_append.3: clarify a NULL input creates a new list 2017-05-05 13:54:56 +02:00
Daniel Stenberg
4b93382193 CURLINFO_REDIRECT_URL.3: add example 2017-05-04 00:00:13 +02:00
Daniel Stenberg
b065a508c6 CURLINFO_EFFECTIVE_URL.3: add example 2017-05-04 00:00:07 +02:00
Kamil Dudka
e3e8d0204b nss: load libnssckbi.so if no other trust is specified
The module contains a more comprehensive set of trust information than
supported by nss-pem, because libnssckbi.so also includes information
about distrusted certificates.

Reviewed-by: Kai Engert
Closes #1414
2017-04-25 13:24:24 +02:00
Dan Fandrich
f9d1e9a27f libcurl-thread.3: fixed a bad macro that caused test 1140 to fail 2017-04-10 07:42:22 +02:00
Daniel Stenberg
1b9b90d94a libcurl-thread.3: also mention threaded-resolver
Reported-by: Alex Bligh
Bug: https://curl.haxx.se/mail/lib-2017-04/0044.html
2017-04-09 23:09:50 +02:00
Jay Satiro
fa66403280 CURLINFO_SCHEME.3: fix variable type
- Change documented param type to char ** from incorrect long *.
2017-04-08 15:44:39 -04:00
Daniel Stenberg
721f8c05c7 docs: added examples for CURLINFO_FILETIME.3 and CURLOPT_FILETIME.3 2017-04-03 00:00:43 +02:00
Peter Wu
ec493dbda2 cmake: fix build with cmake 2.8.12.2
For some reason, CMake 2.8.12.2 did not expand the list argument in a
single DEPENDS argument. Remove the quotes, so it gets expanded into
multiple arguments for add_custom_command and add_custom_target.

Fixes https://github.com/curl/curl/issues/1370
Closes #1372
2017-03-30 23:43:35 +02:00
Daniel Stenberg
f8952932e7 cmake: add cmake file in docs/libcurl/opts/ to dist 2017-03-30 08:16:56 +02:00
Daniel Stenberg
63dd7bbc50 cmake: add more missing files to the dist 2017-03-30 08:12:37 +02:00
Maksim Stsepanenka
d1ddda7e75 make: use the variable MAKE for recursive calls
Closes #1366
2017-03-29 08:17:13 +02:00
klemens
f7df67cff0 spelling fixes
Closes #1356
2017-03-26 23:56:23 +02:00
Daniel Stenberg
e369303cdc CURLINFO_PRIMARY_IP.3: add example 2017-03-22 11:28:33 +01:00
Ales Mlakar
a360906de6 mbedtls: add support for CURLOPT_SSL_CTX_FUNCTION
Ref: https://curl.haxx.se/mail/lib-2017-02/0097.html

Closes https://github.com/curl/curl/pull/1272
2017-03-21 23:51:44 -04:00
Peter Wu
898b012a9b cmake: add support for building HTML and PDF docs
Note that for some reason there is this warning (that also exists with
autotools, added since curl-7_15_1-94-ga718cb05f):

    docs/libcurl/curl_multi_socket_all.3:1: can't open `man3/curl_multi_socket.3': No such file or directory

Additionally, adjust the roffit --mandir option to support creating
links when doing out-of-tree builds.

Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Peter Wu
6f6e9193df docs: split file lists into Makefile.inc
For easier sharing with CMake. The contents were reformatted to use
two-space indent and expanded tabs (matching lib/Makefile.common).

Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Jay Satiro
f7b3914c55 CURLINFO_LOCAL_PORT.3: fix typo 2017-03-16 18:18:49 -04:00
Daniel Stenberg
49f7b13536 CURLINFO_LOCAL_PORT.3: added example 2017-03-16 23:05:22 +01:00
Desmond O. Chang
d2bcf1e3e2 url: add option CURLOPT_SUPPRESS_CONNECT_HEADERS
- Add new option CURLOPT_SUPPRESS_CONNECT_HEADERS to allow suppressing
  proxy CONNECT response headers from the user callback functions
  CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION.

- Add new tool option --suppress-connect-headers to expose
  CURLOPT_SUPPRESS_CONNECT_HEADERS and allow suppressing proxy CONNECT
  response headers from --dump-header and --include.

Assisted-by: Jay Satiro
Assisted-by: CarloCannas@users.noreply.github.com
Closes https://github.com/curl/curl/pull/783
2017-03-12 01:32:33 -05:00
Jozef Kralik
6448f98c18 vtls: add options to specify range of enabled TLS versions
This commit introduces the CURL_SSLVERSION_MAX_* constants as well as
the --tls-max option of the curl tool.

Closes https://github.com/curl/curl/pull/1166
2017-03-08 15:54:07 +01:00
Steve Brokenshire
d960e57029 gitignore: Ignore man page dist files
Ignore man page dist files generated by scripts/updatemanpages.pl
2017-03-07 23:27:31 +01:00
Steve Brokenshire
f5712ca277 Makefile.am: Remove distribution man pages when running 'make clean' 2017-03-07 23:27:31 +01:00
Jay Satiro
21512a015f CURLOPT_SSL_CTX_FUNCTION.3: Fix EXAMPLE formatting errors
.. also document that CURLE_NOT_BUILT_IN is a RETURN VALUE.

Ref: https://github.com/curl/curl/pull/1290
2017-03-04 16:07:28 -05:00
Sylvestre Ledru
658b9a200a fix some typos in the doc (#1306) 2017-03-04 15:50:33 +01:00
JDepooter
0966ab5bd4 darwinssl: Warn that disabling host verify also disables SNI
In DarwinSSL the SSLSetPeerDomainName function is used to enable both
sending SNI and verifying the host. When host verification is disabled
the function cannot be called, therefore SNI is disabled as well.

Closes https://github.com/curl/curl/pull/1240
2017-03-02 02:42:15 -05:00
Peter Wu
eac0dc6a3f docs: de-duplicate file lists in the Makefiles
Make use of macro substitution of suffix patterns to remove duplication
of manual names. This approach is portable according to
http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html

Closes https://github.com/curl/curl/pull/1287
2017-02-25 16:26:22 -05:00
Jay Satiro
b259646ea1 url: Improve CURLOPT_PROXY_CAPATH error handling
- Change CURLOPT_PROXY_CAPATH to return CURLE_NOT_BUILT_IN if the option
  is not supported, which is the same as what we already do for
  CURLOPT_CAPATH.

- Change the curl tool to handle CURLOPT_PROXY_CAPATH error
  CURLE_NOT_BUILT_IN as a warning instead of as an error, which is the
  same as what we already do for CURLOPT_CAPATH.

- Fix CAPATH docs to show that CURLE_NOT_BUILT_IN is returned when the
  respective CAPATH option is not supported by the SSL library.

Ref: https://github.com/curl/curl/pull/1257
2017-02-21 22:24:40 -05:00
Daniel Stenberg
1dcf244721 CURLOPT_SSL_VERIFYPEER.3: also the https proxy version 2017-02-09 23:22:57 +01:00
Jay Satiro
423a93ce32 docs: Add more HTTPS proxy documentation
- Document HTTPS proxy type.

- Document --write-out %{proxy_ssl_verify_result}.

- Document SOCKS proxy + HTTP/HTTPS proxy combination.

HTTPS proxy support was added in 7.52.0 for OpenSSL, GnuTLS and NSS.

Ref: https://github.com/curl/curl/commit/cb4e2be
2017-02-06 03:13:42 -05:00
Richy Kim
6b7616690e CURLOPT_BUFFERSIZE: support enlarging receive buffer
Replace use of fixed macro BUFSIZE to define the size of the receive
buffer.  Reappropriate CURLOPT_BUFFERSIZE to include enlarging receive
buffer size.  Upon setting, resize buffer if larger than the current
default size up to a MAX_BUFSIZE (512KB). This can benefit protocols
like SFTP.

Closes #1222
2017-01-19 23:38:04 +01:00
Kamil Dudka
f1261b1253 docs: non-blocking SSL handshake is now supported with NSS
Implemented since curl-7_36_0-130-g8868a22

Reported-by: Fahim Chandurwala
2017-01-19 12:20:04 +01:00
Isaac Boukris
1d786faee1 unix_socket: add support for abstract unix domain socket
In addition to unix domain sockets, Linux also supports an
abstract namespace which is independent of the filesystem.

In order to support it, add new CURLOPT_ABSTRACT_UNIX_SOCKET
option which uses the same storage as CURLOPT_UNIX_SOCKET_PATH
internally, along with a flag to specify abstract socket.

On non-supporting platforms, the abstract address will be
interpreted as an empty string and fail gracefully.

Also add new --abstract-unix-socket tool parameter.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reported-by: Chungtsun Li (typeless)
Reviewed-by: Daniel Stenberg
Reviewed-by: Peter Wu
Closes #1197
Fixes #1061
2017-01-13 16:25:20 +01:00
Frank Gevaerts
dbd3793859 docs: Add note about libcurl copying strings to CURLOPT_* manpages
Closes #1169
2017-01-13 15:14:55 +01:00
Frank Gevaerts
d2b2c63852 CURLOPT_PREQUOTE.3: takes a struct curl_slist*, not a char* 2017-01-13 15:14:38 +01:00
Dan Fandrich
bbee0d4eee wolfssl: support setting cipher list 2017-01-06 23:02:09 +01:00
Jay Satiro
4f2239c5ca docs/libcurl: TCP_KEEPALIVE start and interval default to 60
Since the TCP keep-alive options were added in 705f0f7 the start and
interval default values have been 60, but that wasn't documented.

Bug: https://curl.haxx.se/mail/lib-2017-01/0000.html
Reported-by: Praveen Pvs
2017-01-02 13:43:05 -05:00
Daniel Stenberg
0128925de5 curl_formadd.3: CURLFORM_CONTENTSLENGTH not needed when chunked
Mentioned in #1013
2016-12-28 11:49:00 +01:00
Daniel Stenberg
209b230227 docs/ciphers: link to our own new page about ciphers
... as the former ones always go stale!
2016-12-25 11:01:17 +01:00
Michael Kaufmann
afff64dbcd curl_easy_recv: Improve documentation and example program
Follow-up to 82245ea: Fix the example program sendrecv.c (handle
CURLE_AGAIN, handle incomplete send). Improve the documentation
for curl_easy_recv() and curl_easy_send().

Reviewed-by: Frank Meier
Assisted-by: Jay Satiro

See https://github.com/curl/curl/pull/1134
2016-12-18 12:56:23 +01:00
Daniel Stenberg
2bd2538eb0 curl_easy_setopt.3: removed CURLOPT_SOCKS_PROXYTYPE 2016-12-17 23:50:14 +01:00
Daniel Stenberg
6bec14f38e curl_easy_setopt.3: CURLOPT_PRE_PROXY instead of CURLOPT_SOCKS_PROXY 2016-12-17 18:09:28 +01:00
Daniel Stenberg
20b12987cf symbols: removed two, added one 2016-12-17 18:00:49 +01:00
Daniel Stenberg
c588840568 CURLINFO_SSL_VERIFYRESULT.3: language 2016-12-16 16:59:08 +01:00
Daniel Stenberg
b0fcb92f80 HTTPS-PROXY docs: update/polish 2016-12-16 16:57:39 +01:00
Daniel Stenberg
845522cadb preproxy: renamed what was added as SOCKS_PROXY
CURLOPT_SOCKS_PROXY -> CURLOPT_PRE_PROXY

Added the corresponding --preroxy command line option. Sets a SOCKS
proxy to connect to _before_ connecting to a HTTP(S) proxy.
2016-12-16 16:04:23 +01:00
Daniel Stenberg
7907a2bec9 CURLOPT_SOCKS_PROXYTYPE: removed
This was added as part of the SOCKS+HTTPS proxy merge but there's no
need to support this as we prefer to have the protocol specified as a
prefix instead.
2016-12-16 15:10:19 +01:00
Daniel Stenberg
558b5f68a6 curl_multi_socket.3: fix typo 2016-12-15 17:26:23 +01:00
Jeremy Pearson
254c0b3052 libcurl-multi.3: typo
Closes https://github.com/curl/curl/pull/1153
2016-12-03 15:40:54 -05:00
Daniel Stenberg
c67f842093 CURLOPT_PROXY_*.3: polished some proxy option man pages 2016-11-27 00:21:15 +01:00
Okhin Vasilij
a4b2f7aafd curl_version_info: add CURL_VERSION_HTTPS_PROXY
Closes #1142
2016-11-26 17:28:53 +01:00
Daniel Stenberg
3f7d9b9001 CURLOPT_PROXY_CAINFO.3: clarify proxy use 2016-11-25 16:40:32 +01:00
Daniel Stenberg
2527dd4378 CURLOPT_PROXY_CRLFILE.3: clarify https proxy and availability 2016-11-25 16:36:27 +01:00
Daniel Stenberg
67edddeb92 curl_easy_setopt.3: add CURLOPT_PROXY_PINNEDPUBLICKEY
Follow-up to 4f8b17743d
2016-11-25 14:17:44 +01:00
Daniel Stenberg
9bfb00efc9 docs: include all opts man pages in dist
Sorted the lists too.

... and include the new ones in the PDF and HTML generation targets
2016-11-25 11:14:58 +01:00
Thomas Glanzmann
4f8b17743d HTTPS Proxy: Implement CURLOPT_PROXY_PINNEDPUBLICKEY 2016-11-25 10:49:38 +01:00