summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
Commit message (Collapse)AuthorAgeFilesLines
* MFH (r310823): fix multi-line CONNECT responsesdes2017-01-091-1/+1
| | | | PR: 194483
* MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requestsdes2016-12-143-54/+124
|
* r169386 (PR 112515) was incomplete: it treated 307 as an error exceptdes2016-05-311-0/+3
| | | | | | | | | | | | | in verbose mode, and did not handle 308 at all. r241840 (PR 172451) added support for 308, but with the same bug. Correctly handle both by recognizing them as redirects in all places where we check the HTTP result code. PR: 112515 173451 209546 Submitted by: novel@ MFC after: 1 week
* Call closedir() before returning from fetchListFile() to avoid a leak.truckman2016-05-251-0/+1
| | | | | | Reported by: Coverity CID: 1016697 MFC after: 1 week
* Don't leak addrinfo in fetch_bind()truckman2016-05-251-1/+4
| | | | | | Reported by: Coverity CID: 1225038 MFC after: 1 week
* Use strlcpy() instead of strncpy() to copy the string returned bytruckman2016-05-121-1/+1
| | | | | | | | | | | | setlocale() so that static analyzers know that the string is NUL terminated. This was causing a false positive in Coverity even though the longest string returned by setlocale() is ENCODING_LEN (31) and we are copying into a 64 byte buffer. This change is also a bit of an optimization since we don't need the strncpy() feature of padding the rest of the destination buffer with NUL characters. Reported by: Coverity CID: 974654
* lib: minor spelling fixes in comments.pfg2016-05-011-2/+2
| | | | No functional change.
* MFHgjb2016-04-111-1/+1
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * libfetch: replace 0 with NULL for pointers.pfg2016-04-091-1/+1
| | | | | | | | | | | | Found with devel/coccinelle. Reviewed by: des
* | MFHgjb2016-04-041-11/+17
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Fix bunch of .Xrs.trasz2016-03-281-1/+0
| | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * Update fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundlesgrembo2016-03-191-10/+17
| | | | | | | | | | | | | | Reviewed by: wblock Approved by: wblock MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5558
* | MFHgjb2016-03-021-6/+0
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Regenerate without local dependencies.bdrewery2016-02-241-6/+0
| | | | | | | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division
* | MFHgjb2016-02-151-1/+0
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Fix double-free error: r289419 moved all error handling in http_connect()des2016-02-111-1/+0
| | | | | | | | | | | | | | | | | | to the end of the function, but did not remove a fetch_close() call which was made redundant by the one in the shared error-handling code. PR: 206774 Submitted by: Christian Heckendorf <heckendorfc@gmail.com> MFC after: 3 days
* | First pass through library packaging.gjb2016-02-041-0/+1
|/ | | | Sponsored by: The FreeBSD Foundation
* Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATHbapt2016-01-191-3/+10
| | | | | | | | | | | | | | | | | Prior to this patch, unless SSL_CA_CERT_FILE is set in the environment, libfetch will set the CA file to "/usr/local/etc/cert.pem" if it exists, and to "/etc/ssl/cert.pem" otherwise. This has the consequence of masking SSL_CA_CERT_PATH, because OpenSSL will ignore the CA path if a CA file is set but fails to load (see X509_STORE_load_locations()). While here, fall back to OpenSSL defaults if neither SSL_CA_CERT_FILE nor SSL_CA_CERT_PATH are set in the environment, and if neither of the libfetch default CA files exists. PR: 193871 Submitted by: John W. O'Brien <john@saltant.com> Approved by: des MFC after: 1 week
* As a followup to r292330, standardize on size_t and add a few comments.des2015-12-161-2/+5
|
* Reset bufpos to 0 immediately after refilling the buffer. Otherwise, wedes2015-12-161-3/+2
| | | | | | | | | | risk leaving the connection in an indeterminate state if the server fails to send a chunk delimiter. Depending on the application and on the sizes of the preceding chunks, the result can be anything from missing data to a segfault. With this patch, it will be reported as a protocol error. PR: 204771 MFC after: 1 week
* Fix buildworld after r291453, similar to r284346: url->user and url->pwddim2015-11-291-4/+2
| | | | | | | are arrays, so they can never be NULL. Reported by: many Pointy hat to: des
* Use .netrc for HTTP sites and proxies, not just FTP.des2015-11-292-3/+11
| | | | | | PR: 193740 Submitted by: TEUBEL György <tgyurci@gmail.com> MFC after: 1 week
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Use fopen()'s newfangled "e" flag instead of explicit fcntl() calls.des2015-10-161-5/+3
| | | | | | PR: 199801 Submitted by: Jukka Ukkonen <jau@iki.fi> MFC after: 1 week
* Fix two bugs in HTTPS tunnelling:des2015-10-161-4/+32
| | | | | | | | | | - If the proxy returns a non-200 result, set the error code accordingly so the caller / user gets a somewhat meaningful error message. - Consume and discard any HTTP response header following the result line. PR: 194483 Tested by: Fabian Keil <fk@fabiankeil.de> MFC after: 1 week
* Fix non-POSIX-compliant use of getaddrinfo in libfetchgrembo2015-09-251-1/+2
| | | | | | | | Submitted by: Boris Kolpackov <boris@codesynthesis.com> Reviewed by: bapt Approved by: bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3724
* Remove unused variable to silence clang warning.araujo2015-07-041-4/+1
| | | | | Differential Revision: D2683 Reviewed by: rodrigc, bapt
* new dependssjg2015-06-161-1/+0
|
* Fix the following clang 3.7.0 warnings in lib/libfetch/http.c:dim2015-06-131-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lib/libfetch/http.c:1628:26: error: address of array 'purl->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = purl->user ? ~~~~~~^~~~ ~ lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = purl->pwd? ~~~~~~^~~~ lib/libfetch/http.c:1657:25: error: address of array 'url->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url->user ? ~~~~~^~~~ ~ lib/libfetch/http.c:1659:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url->pwd ? ~~~~~^~~ ~ lib/libfetch/http.c:1669:25: error: address of array 'url->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url->user ? ~~~~~^~~~ ~ lib/libfetch/http.c:1671:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url->pwd ? ~~~~~^~~ ~ Since url->user and url->pwd are arrays, they can never be NULL, so the checks can be removed. Reviewed by: bapt MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D2673
* Add META_MODE support.sjg2015-06-131-0/+28
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-273-13/+5
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-192-14/+24
| |\
| * \ Merge head from 7/28sjg2014-08-196-26/+77
| |\ \
| * | | Updated dependenciessjg2014-05-161-0/+2
| | | |
| * | | Merge from headsjg2014-05-081-1/+1
| |\ \ \
| * \ \ \ Merge headsjg2014-04-273-134/+85
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-055-28/+666
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| * | | | | | Sync with HEAD.obrien2013-02-081-4/+4
| |\ \ \ \ \ \
| * | | | | | | Updated/new Makefile.dependsjg2012-11-081-0/+5
| | | | | | | |
| | | | | | | |
| | \ \ \ \ \ \
| *-. \ \ \ \ \ \ Sync from headsjg2012-11-045-8/+37
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+22
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | Remove defunct SSLv2 support from fetch(1) and fetch(3).jkim2015-03-252-9/+3
| | | | | | | | |
* | | | | | | | | Convert libraries to use LIBADDbapt2014-11-251-4/+2
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | While here reduce a bit overlinking
* | | | | | | | As pointed out by several people, r273114 was incorrect: it unconditionallydes2014-10-152-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disabled everything except TLS 1.0. Replace it with a more carefully wrought patch: - Switch the default for SSLv3 from on to off - Add environment variables to control TLS 1.1 and 1.2 - In verbose mode, report which version is used - Update the man page to reflect these changes. MFC after: 1 week
* | | | | | | | Drop support for SSLv3.des2014-10-151-1/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | MFC after: 1 week
* | | | | | | Add a comment to explain the EAGAIN is only there for POSIX compliancebapt2014-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resquested by: kib Reviewed by: des
* | | | | | | Support EAGAIN in fetch_writevbapt2014-07-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: des Approved by: des
OpenPOWER on IntegriCloud