summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove tenex transfer support. if you still have TOPS20 machines intedu2015-01-307-55/+14
| | | | | | service, you'll need to stick with openbsd 5.6. bonus: remove references to ebcdic. ok deraadt
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-169-49/+50
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Fetching port distfiles with the ftp command from githup did notbluhm2015-01-121-9/+25
| | | | | | | | | work when using a https proxy because of a missing host header. Remember the host form the url and write it into the http request. Fix the format string when using Proxy-Authorization together with Cookie. Also write the http request to the debugging output to see what is going on. input jca@; OK sthen@ mpi@
* set ttyout to line buffered, because the signal handler writes arederaadt2014-11-251-1/+5
| | | | | non-buffered. They were getting out of order. from Kaspars Bankovskis, discussion included millert
* Reduce instances of `` '' in manuals.bentley2014-11-151-3/+4
| | | | | | | | | | | | troff displays these as typographic quotes, but nroff implementations almost always print them literally, which rarely has the intended effect with modern fonts, even in stock xterm. These uses of `` '' can be replaced either with more semantic alternatives or with Dq, which prints typographic quotes in a UTF-8 locale (but will automatically fall back to `` '' in an ASCII locale). improvements and ok schwarze@
* Update ftp(1) to use libtls instead of libressl.jsing2014-10-314-74/+74
|
* use ressl constant; from Jan Klemkowtedu2014-10-301-2/+2
|
* Remove unnecessary include: netinet/in_systm.h is not needed by theselteo2014-10-241-2/+1
| | | | | | programs. ok deraadt@ millert@
* userland reallocarray audit.doug2014-10-082-4/+5
| | | | | | | Replace malloc() and realloc() calls that may have integer overflow in the multiplication of the arguments with reallocarray(). ok deraadt@
* Amend previous commit to unbreak TLS cert validation when using a proxy.jca2014-10-061-8/+7
| | | | ok miod@
* Be sure to only path the remote host to ressl_connect_socket(), without amiod2014-10-041-2/+2
| | | | | | | possible :portnumber suffix. Noticed by ajacoutot@ ok ajacoutot@ deraadt@
* update for new ressl noverify APItedu2014-10-031-2/+4
|
* Update ftp ressl configuration to handle recent changes in the library.jsing2014-10-031-7/+10
|
* you broke the ramdisk builds...deraadt2014-08-251-1/+3
|
* When using a proxy for an https connection, validate the cert hostnamejca2014-08-251-2/+7
| | | | | | against the target hostname, not the proxy hostname. Issue reported by dlg@, fix by Alex Wilson on tech@, tweaks by me. No reply from tech@
* Fix double free. ok guenther@jca2014-08-211-2/+1
|
* I found a number of interactive events which can cause signals, and goderaadt2014-08-164-23/+45
| | | | | | | down paths not previously marked as signal handled unsafe. Try to clean up a few of them especially regarding errno, mark others as unsafe, and repair a few by avoiding stdio. Glanced at by misc people in Slovenia, but considered too risky before release..
* Clean up the ifdef maze in usage() by reformatting it to have distinctlteo2014-07-161-50/+14
| | | | | | | | | | | !SMALL and SMALL sections. This makes future changes easier to review and to compare with the man page's synopsis. The usage output is the same as before so there is no change from the user's point of view. usage() cleanup and !SMALL/SMALL separation suggested by jmc@ ok jmc@
* Convert ftp(1) to libressl, rather than rolling in^W^Whand rolling libssl.jsing2014-07-144-315/+74
| | | | ok beck@ deraadt@
* Repair handling of ^C and ^D around command prompts, by insertingderaadt2014-07-141-2/+9
| | | | | | | correct newlines. Of course, that means removing stdio use from signal handlers. Can we find someone to rewrite the entire interactive half of this program? ok guenther
* simplify and slightly tweak user agent handlinghalex2014-07-112-20/+7
| | | | ok lteo@
* Allow ftp(1) to change its User-Agent for HTTP(S) URL requests using alteo2014-07-114-10/+45
| | | | | | | -U command-line option. feedback from deraadt@, halex@, and Adam Thompson ok deraadt@ sthen@, man page changes ok jmc@
* Given an http or https URL with user and password, URL-decode the userguenther2014-07-051-33/+50
| | | | | | | | | | | | | | | and password info before base64 encoding it for the Authorization header. Also: - eliminate the COOKIE_MAX_LEN constant (if they can fit it on the command line or in their environment, surely we can malloc the base64 version) - rename the variable with user:pass from "cookie" to "credentials" - empty password isn't an error - add a boolean ishttpurl so that we don't have to do strcmps on the schema that we just set - when looping across multiple ftp:// urls on the command line, don't leak the username/password memory problem noted by Se'bastien Marie (semarie-openbsd (at) latrappe.fr)
* Alexander Schrijver posted a diff to remove references to the c_rehash script,jmc2014-06-251-3/+4
| | | | | | which we don;t have in base. after some discussion with jca, i've not removed these references, but tried to make it clearer it's distributed with openssl and not included in base;
* Use errc/warnc to simplify code.guenther2014-05-203-16/+16
| | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
* X509_free() the certificate if the server hostname check fails.jca2014-05-191-1/+2
| | | | No functional change. Reported by Mike Small and Maxime Villard.
* Explicitely initialize two static variables introduced in the previousjca2014-05-191-3/+3
| | | | commit, to please lteo@
* HTTPS connections may see redirects, so initialize libcrypto and libssljca2014-05-191-22/+49
| | | | | only once, and reuse the crafted SSL_CTX for further connections. ok lteo@
* Kill useless assignement, matchlen is initialized two lines below.jca2014-04-231-2/+1
| | | | From Fritjof Bornebusch.
* remove dead stores to error. from Fritjof Bornebuschtedu2014-04-221-15/+3
|
* If TLS validation is on, retrieve the server TLS certificate andjca2014-04-091-1/+184
| | | | | check the server hostname against the subjectAltName extension field and/or the CommonName DN portion. ok sthen@
* SNI support. ok guenther@ sthen@jca2014-03-301-1/+14
|
* Check the return value from SSL_CTX_set_cipher_list(), for consistency.jca2014-03-301-3/+6
| | | | ok guenther@ sthen@
* SSLeay_add_ssl_algorithms() is just a #define for SSL_library_init(), sojca2014-03-301-2/+1
| | | | kill the former. ok guenther@ sthen@
* only signed types work when comparing less than zero.tedu2014-03-021-2/+2
| | | | reported by matthieu. ok deraadt
* use a larger read buffer to speed things up, particularly during upgrades.tedu2014-02-261-5/+6
| | | | ok deraadt
* Unbreak ftp progress meter after the introduction of the '-D' flagdcoppa2014-01-291-2/+2
| | | | ok tedu@
* tweak previous;jmc2014-01-231-4/+6
|
* Add -D shorttitle support, so that the progress meter can show some sortderaadt2014-01-234-10/+39
| | | | | | of reason why it is processing a certain file. This will be used by the installer for that purpose. ok krw rpe
* Add support for SSL/TLS server certificate validation, enabled byjca2013-12-244-7/+148
| | | | | | default. See the documentation for the `-S' switch. This also allows setting the preferred ciphers for the communication. Documentation bits ok'ed by jmc@, ok beck@ sthen@.
* When writing a file, break out when we get a write(2) error, notjca2013-12-201-2/+4
| | | | | just EPIPE, else we'll just reattempt the write with non-sensical values. From Maxime Villard (max at m00nbsd dot net).
* protosderaadt2013-11-132-13/+13
|
* satisfy gcc in -Whiny modederaadt2013-11-131-2/+2
|
* simple prototype repairsderaadt2013-11-121-1/+3
|
* If a constant string needs a name, use a static const array instead of aguenther2013-10-271-2/+2
| | | | | | | | pointer or non-const array, as that minimizes the symbols, maximizes the placement into read-only memory, and avoids warnings from gcc -Wformat=2 when they're used as format strings. ok deraadt@
* Remove an obsolete paragraph in the BUGS section about using ftp(1) withlteo2013-04-281-13/+2
| | | | | | 4.2BSD servers. ok jmc nick tedu
* Retry when SSL_read fails with SSL_ERROR_WANT_READ. Fixes the case wheresthen2013-04-091-4/+12
| | | | an https server attempts renegotiation. ok jung@
* Fixed a memory leak during HTTP header parsing.tobias2013-03-301-1/+2
| | | | ok deraadt, halex, sthen
* Add a STANDARDS section to list RFC's related to the FTP protocollteo2013-02-191-2/+17
| | | | | | | | (matches the STANDARDS section on the ftpd(8) man page); suggested by jmc@ in a discussion about this man page with Sebastian Rother and myself. ok jmc phessler
* ARPANET -> Internetlteo2013-02-151-6/+5
| | | | ok jmc