1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 00:55:04 -05:00
Commit Graph

22389 Commits

Author SHA1 Message Date
Patrick Monnerat
c1d0b6f98e mime: replace 'struct Curl_mimepart' by 'curl_mimepart' in encoder code.
mime_state is now a typedef.
2017-09-05 18:20:06 +01:00
Patrick Monnerat
63ef436ea1 mime: implement encoders.
curl_mime_encoder() is operational and documented.
curl tool -F option is extended with ";encoder=".
curl tool --libcurl option generates calls to curl_mime_encoder().
New encoder tests 648 & 649.
Test 1404 extended with an encoder specification.
2017-09-05 17:55:51 +01:00
Patrick Monnerat
3bbe894fd2 runtests.pl: support attribute "nonewline" in part verify/upload. 2017-09-05 17:33:16 +01:00
Daniel Stenberg
328ce03d53 fixup data/test1135 2017-09-05 17:33:16 +01:00
Daniel Stenberg
9926357b42 mime: unified to use the typedef'd mime structs everywhere
... and slightly edited to follow our code style better.
2017-09-05 17:33:16 +01:00
Daniel Stenberg
295ce716a2 curl.h: use lower case curl_mime* as for all public symbols 2017-09-05 17:33:16 +01:00
Daniel Stenberg
8b902ef0af docs/curl_mime_*.3: use correct variable types in examples 2017-09-05 17:33:16 +01:00
Kamil Dudka
ea142a837e openssl: use OpenSSL's default ciphers by default
Up2date versions of OpenSSL maintain the default reasonably secure
without breaking compatibility, so it is better not to override the
default by curl.  Suggested at https://bugzilla.redhat.com/1483972

Closes #1846
2017-09-05 12:13:38 +02:00
Viktor Szakats
25fc694a41 examples/mime: minor example code fixes 2017-09-05 10:05:27 +00:00
Daniel Stenberg
eae21db920
docs/curl_mime_*.3: added examples 2017-09-05 11:15:02 +02:00
Daniel Stenberg
889723b004
configure: add MultiSSL to FEATURES when enabled
...for curl-config and its corresponding test 1014
2017-09-05 10:45:09 +02:00
Daniel Stenberg
3130414ce7
http-proxy: treat all 2xx as CONNECT success
Added test 1904 to verify.

Reported-by: Lawrence Wagerfield
Fixes #1859
Closes #1860
2017-09-05 09:47:46 +02:00
Daniel Stenberg
d491a9c3a8
MAIL-ETIQUETTE: added "1.9 Your emails are public" 2017-09-05 09:29:11 +02:00
Daniel Stenberg
7b81623660
curl.h: fix "unused checksrc ignore", remove dangling reference
... to a README file that doesn't exist anymore
2017-09-04 19:59:11 +02:00
Viktor Szakats
1c8725e639 docs: Update to secure URL versions 2017-09-04 14:08:54 +00:00
Viktor Szakats
841a09ea19 mime: use CURL_ZERO_TERMINATED in examples
and some minor whitespace fixes
2017-09-04 13:58:10 +00:00
Daniel Stenberg
202c1cc22f
schannel: return CURLE_SSL_CACERT on failed verification
... not *CACERT_BADFILE as it isn't really because of a bad file.

Bug: https://curl.haxx.se/mail/lib-2017-09/0002.html
Closes #1858
2017-09-04 11:48:38 +02:00
Daniel Stenberg
4ed618c023
test1135: fixed after bd8070085f 2017-09-04 11:44:42 +02:00
Daniel Stenberg
12e789391d
examples/post-callback: stop returning one byte at a time
... since people copy and paste code from this example and thus they get
an inefficient POST operation without a good reason and sometimes
without understanding why.

Instead this now returns as much data as possible.
2017-09-04 11:42:00 +02:00
Daniel Stenberg
b081f2ada6
RELEASE-NOTES: fixed the function counter script 2017-09-04 09:40:04 +02:00
Daniel Stenberg
bd8070085f
curl.h: make the curl_strequal() protos use the same style
... as the other functions. Makes it easier to machine-parse!
2017-09-04 09:38:19 +02:00
Daniel Stenberg
2e4074c953
docs: curl_mime_*.3 man page formatting edits 2017-09-04 09:20:24 +02:00
Daniel Stenberg
d24c05b908
RELEASE-NOTES: synced with 1ab9e9b50 2017-09-04 08:34:53 +02:00
Patrick Monnerat
1ab9e9b50a lib: bump version info (soname). Adapt and reenable test 1135. 2017-09-04 00:35:53 +01:00
Daniel Stenberg
0d4a6355a8
headers: move the global_sslset() proto from multi.h to curl.h
As it was added to multi.h simply to not break test 1135, which now has
been disabled due to the mime API addition anyway and su we can now move
the sslset stuff to where the other curl_global_* prototypes are.
2017-09-03 23:53:15 +02:00
Patrick Monnerat
7e36b30da8 mime: fix signed/unsigned conversions.
Use and generate CURL_ZERO_TERMINATED in curl tool and tests.
2017-09-03 17:51:18 +01:00
Jay Satiro
437475901d tool_formparse: fix some trivial warnings 2017-09-03 12:13:44 -04:00
Patrick Monnerat
efd9301426 mime: use size_t instead of ssize_t in public API interface.
To support telling a string is nul-terminated, symbol CURL_ZERO_TERMINATED
has been introduced.

Documentation updated accordingly.

symbols in versions updated. Added form API symbols deprecation info.
2017-09-03 16:10:55 +01:00
Patrick Monnerat
1a3f4c1991 mime: remove support "-" stdin pseudo-file name in curl_mime_filedata().
This feature is badly supported in Windows: as a replacement, a caller has
to use curl_mime_data_cb() with fread, fseek and possibly fclose
callbacks to process opened files.

The cli tool and documentation are updated accordingly.

The feature is however kept internally for form API compatibility, with
the known caveats it always had.

As a side effect, stdin size is not determined by the cli tool even if
possible and this results in a chunked transfer encoding. Test 173 is
updated accordingly.
2017-09-03 14:45:43 +01:00
Patrick Monnerat
045b076ae8 mime: fix some implicit curl_off_t --> size_t conversion warnings. 2017-09-03 10:18:58 +01:00
Patrick Monnerat
3baf36edf6 mime: tests and examples.
Additional mime-specific tests.
Existing tests updated to reflect small differences (Expect: 100-continue,
data size change due to empty lines, etc).
Option -F headers= keyword added to tests.
test1135 disabled until the entry point order change is resolved.
New example smtp-mime.
Examples postit2 and multi-post converted from form API to mime API.
2017-09-02 19:08:45 +01:00
Patrick Monnerat
fec7a858b8 mime: use in curl cli tool instead of form API.
Extended -F option syntax to support multipart mail messages.
-F keyword headers= added to include custom headers in parts.
Documentation upgraded.
2017-09-02 18:17:33 +01:00
Patrick Monnerat
ce0881edee mime: new MIME API.
Available in HTTP, SMTP and IMAP.
Deprecates the FORM API.
See CURLOPT_MIMEPOST.
Lib code and associated documentation.
2017-09-02 17:47:10 +01:00
Patrick Monnerat
5bae72734b test564: Add a warning comment about shell profile output.
Shell profile output makes the SSH server failing and this problem reason
is not easy to find when no hint is given.
2017-09-02 13:01:15 +01:00
Patrick Monnerat
ea4e7bdc81 checksrc: disable SPACEBEFOREPAREN for case statement.
The case keyword may be followed by a constant expression and thus should
allow it to start with an open parenthesis.
2017-09-02 12:58:55 +01:00
Patrick Monnerat
989e4d4a31 runtests.pl: allow <file[1-4]> tags in client section.
This enables tests to create more than one file on the client side.
2017-09-02 12:57:13 +01:00
Patrick Monnerat
f0cda34145 runtests.pl: Apply strippart to upload too.
This will allow substitution of boundaries in mail messages.
2017-09-02 12:55:28 +01:00
Patrick Monnerat
6869d65f54 Curl_base64_encode: always call with a real data handle.
Some calls in different modules were setting the data handle to NULL, causing
segmentation faults when using builds that enable character code conversions.
2017-09-02 12:49:59 +01:00
Patrick Monnerat
70231d6a65 non-ascii: allow conversion functions to be called with a NULL data handle. 2017-09-02 12:45:21 +01:00
Patrick Monnerat
3b51fa6285 http: fix a memory leakage in checkrtspprefix(). 2017-09-02 12:40:19 +01:00
Max Dymond
57001ce3bb ossfuzz: Move to C++ for curl_fuzzer.
Automake gets confused if you want to use C++ static libraries with C
code - basically we need to involve the clang++ linker. The easiest way
of achieving this is to rename the C code as C++ code. This gets us a
bit further along the path and ought to be compatible with Google's
version of clang.
2017-09-02 11:07:55 +02:00
Daniel Stenberg
c290b8fb23
curl_global_sslset: select backend by name case insensitively
Closes #1849
2017-09-01 11:51:32 +02:00
Max Dymond
1cf323ec4e
ossfuzz: additional seed corpora
Create simple seed corpora for:
- FTP
- telnet
- dict
- tftp
- imap
- pop3

based off the tests of the same number.

Closes #1842
2017-09-01 11:23:07 +02:00
Max Dymond
efeb4a3176
ossfuzz: moving towards the ideal integration
- Start with the basic code from the ossfuzz project.
- Rewrite fuzz corpora to be binary files full of Type-Length-Value
  data, and write a glue layer in the fuzzing function to convert
  corpora into CURL options.
- Have supporting functions to generate corpora from existing tests
- Integrate with Makefile.am
2017-09-01 11:22:51 +02:00
Daniel Stenberg
222e65fd78
strcase: corrected comment header for Curl_strcasecompare() 2017-08-31 11:37:36 +02:00
Daniel Stenberg
529f056809
unit1301: fix error message on first test 2017-08-31 11:37:13 +02:00
Daniel Stenberg
f7512d7bec
curl_global_sslset.3: show the struct and enum too
... so that users can actually write code based on the man page alone,
not having to read the header file.
2017-08-31 10:13:49 +02:00
Jay Satiro
aa2ea66cda darwinssl: handle long strings in TLS certs (follow-up)
- Fix handling certificate subjects that are already UTF-8 encoded.

Follow-up to b3b75d1 from two days ago. Since then a copy would be
skipped if the subject was already UTF-8, possibly resulting in a NULL
deref later on.

Ref: https://github.com/curl/curl/issues/1823
Ref: https://github.com/curl/curl/pull/1831

Closes https://github.com/curl/curl/pull/1836
2017-08-31 02:37:35 -04:00
Daniel Stenberg
410bf6b7b1
cyassl: call it the "WolfSSL" backend
... instead of cyassl, as this is the current name for it.

Closes #1844
2017-08-31 00:55:36 +02:00
Daniel Stenberg
5734f73f0d
polarssl: fix multissl breakage
Reported-by: Dan Fandrich
Bug: https://curl.haxx.se/mail/lib-2017-08/0121.html
Closes #1843
2017-08-31 00:53:05 +02:00