Commit Graph

90 Commits

Author SHA1 Message Date
Darshit Shah 2cfcadf5e6 Fix compile error when IPv6 is disabled
* src/ftp-basic.c: The code for the new FTPS functionality was unintentionally
inside a #ifdef IPV6 block. Move the code around so that it is defined even when
IPV6 isn't used
2015-11-17 13:40:44 +01:00
Ander Juaristi f8901af4e0 Added support for FTPS
* doc/wget.texi: updated documentation to reflect the new FTPS functionality.
 * src/ftp-basic.c (ftp_greeting): new function to read the server's greeting.
   (ftp_login): greeting code was previously here. Moved to ftp_greeting to
   support FTPS implicit mode.
   (ftp_auth): wrapper around the AUTH TLS command.
   (ftp_ccc): wrapper around the CCC command.
   (ftp_pbsz): wrapper around the PBSZ command.
   (ftp_prot): wraooer around the PROT command.
 * src/ftp.c (get_ftp_greeting): new static function.
   (init_control_ssl_connection): new static function to start SSL/TLS on the
   control channel.
   (getftp): added hooks to support FTPS commands (RFCs 2228 and 4217).
   (ftp_loop_internal): test for new FTPS error codes.
 * src/ftp.h: new enum 'prot_level' with available FTPS protection levels +
   prototypes of previous functions. New flag for enum 'wget_ftp_fstatus' to track
   whether the data channel has some security mechanism enabled or not.
 * src/gnutls.c (struct wgnutls_transport_context): new field 'session_data'.
   (wgnutls_close): free GnuTLS session data before exiting.
   (ssl_connect_wget): save/resume SSL/TLS session.
 * src/http.c (establish_connection): refactor ssl_connect_wget call.
   (metalink_from_http): take into account SCHEME_FTPS as well.
 * src/init.c, src/main.c, src/options.h: new command line/wgetrc options.
   (main): in recursive downloads, check for SCHEME_FTPS as well.
 * src/openssl.c (struct openssl_transport_context): new field 'sess'.
   (ssl_connect_wget): save/resume SSL/TLS session.
 * src/retr.c (retrieve_url): check new scheme SCHEME_FTPS.
 * src/ssl.h (ssl_connect_wget): refactor. New parameter of type 'int *'.
 * src/url.c. src/url.h: new scheme SCHEME_FTPS.
 * src/wget.h: new FTPS error codes.
 * src/metalink.h: support FTPS scheme.
2015-09-14 10:16:44 +02:00
Giuseppe Scrivano 16f1fb1d1f maint: update copyright year ranges to include 2015 2015-03-09 16:32:01 +01:00
Tim Ruehsen 5e3a760731 src/ftp-basic.c: Accept 5-digit port numbers in EPSV responses
Reported-by: Adam Sampson <ats@offog.org>
2015-01-04 20:57:15 +01:00
Tim Ruehsen 4850e9c873 Replaced xfree_null() by xfree() and nullify argument after freeing. 2014-12-01 16:15:37 +01:00
Tim Rühsen 3c51ad7f02 Removed form feeds from sources and NEWS 2014-11-20 16:35:34 +01:00
Tim Rühsen 7b43510fe3 Fixes possible issues with Wget running in a turkish locale 2014-11-20 10:56:21 +01:00
Tim Rühsen 1356e90a14 Trivial fixes for C89 compliancy 2014-11-20 09:56:57 +01:00
Tim Rühsen 18fe274e1c Fix loop check in FTP code
Reported-by: Coverity scanner
2014-11-19 16:05:55 +01:00
Giuseppe Scrivano 8e6de1fb5f Drop usage of strncpy 2014-06-12 18:49:13 +02:00
Andrea Urbani c3835a425a "LIST" or "LIST -a" ftp command according to the remote system 2013-10-28 23:37:10 +01:00
Tim Ruehsen f1d4aeaffb Fix memory leak. 2012-04-21 12:08:45 +02:00
Giuseppe Scrivano 2f6aa1d741 mass change: update copyright years. 2011-01-01 13:19:37 +01:00
Giuseppe Scrivano 9ae052b1e2 Remove redundant guard. 2010-12-01 13:15:13 +01:00
Giuseppe Scrivano 542c549985 Silent warnings reported by clang. 2010-10-16 03:04:25 +02:00
Giuseppe Scrivano 293008f682 Mass update copyright years. 2010-05-08 21:56:15 +02:00
Micah Cowan 4a08094db8 [mq]: cfg-mk 2009-09-21 20:39:44 -07:00
Micah Cowan b9e9ad65cc Ran update-copyright. 2009-09-04 00:13:47 -07:00
Micah Cowan 5daac18e96 Adjust some typos from vms merge, and remove some elements we don't want to include without further consideration first. 2009-07-04 18:42:59 -07:00
Micah Cowan d5e283b1a7 Automated merge. 2009-07-04 15:32:57 -07:00
Saint Xavier 26252ac4ca escnonprint has been replaced by quotearg_style; reflect that change in comments too 2008-06-30 20:03:01 +02:00
Micah Cowan 48b53471e8 Henri's -Wall patch. 2008-05-30 22:42:36 -07:00
Steven Schubiger b23251aac2 Further quote*()-related integrations in ftp-basic.c. 2008-04-25 22:38:51 +02:00
Micah Cowan 714ccdcd84 Steven Schweda's VMS patch. 2008-04-22 14:48:36 -07:00
Steven Schubiger 2c77220411 Undo the USE_GNULIB_ALLOC defines. 2008-04-20 11:46:52 +02:00
Steven Schubiger 76780021d8 Use Gnulib's alloc functions throughout the source. 2008-04-19 01:21:24 +02:00
Micah Cowan bc8f473272 Updated copyright year. 2008-01-25 05:04:01 -08:00
Micah Cowan 462e643a7e Merge SFLC licensing changes for OpenSSL with tip. 2007-12-07 17:37:07 -08:00
Micah Cowan 86395b297b Updated licensing exception for OpenSSL from the SFLC. 2007-11-28 00:05:33 -08:00
Micah Cowan 212396c7e1 Eschew config-post.h. 2007-10-18 20:50:40 -07:00
Micah Cowan da99855784 ISSPACE -> c_isspace 2007-10-14 14:46:24 -07:00
Micah Cowan 5dd09d9ba5 Update copyright lists, conforming to maintainer guidelines 2007-09-28 15:45:31 -07:00
micah 7d2066b221 [svn] Make indentation consistent (all-spaces, no tabs). 2007-08-02 20:38:21 -07:00
micah 4d7c5e087b [svn] Merge of fix for bugs 20341 and 20410. 2007-07-09 22:53:22 -07:00
mtortonesi bd7f4ef701 [svn] Fixed segfault if response text is missing 2007-01-09 06:37:03 -08:00
mtortonesi 1c7493b83e [svn] Added sanity checks for -k, -p, -r and -N when -O is given. Added fixes for 64-bit platforms. Updated copyright and maintainer information. 2006-07-14 06:25:50 -07:00
mtortonesi d34270c536 [svn] Add support for download of hidden files from FTP. 2006-03-09 05:50:03 -08:00
hniksic 481443d337 [svn] Simplify the ip_address data union. Always use inet_ntop for printing
IP addresses when IPv6 is enabled.
2005-08-10 06:50:08 -07:00
hniksic b3900f1fbd [svn] In for loops with empty body, put the ";" on a separate line to silence
a warning from DMC.
2005-07-06 18:08:52 -07:00
hniksic db9de5b075 [svn] Update FSF's address and copyright years. 2005-07-01 19:26:52 -07:00
hniksic c1fb83c53b [svn] Renamed "pretty_print_address" to "print_address". 2005-06-30 13:03:18 -07:00
hniksic 277e840a0f [svn] Remove K&R support. 2005-06-19 15:34:58 -07:00
hniksic 4f22c2f567 [svn] Handle invalid response to PWD gracefully. 2005-06-15 13:11:50 -07:00
hniksic 3b00da8f9a [svn] Fix erroneous comments in ftp_eprt. 2005-05-16 15:08:57 -07:00
hniksic 430f5f3b1e [svn] Don't xfree() the line returned by ftp_response if the returned code is not
FTPOK.
2005-05-16 08:19:12 -07:00
hniksic 9bdeaf453d [svn] Prevent newlines in FTP command arguments causing inadvertent sending of
multiple FTP commands.
2005-05-06 18:06:26 -07:00
hniksic ce06e4297f [svn] Fix printing of FTP response. 2005-05-05 03:10:51 -07:00
hniksic 0967c21094 [svn] Fix K&R incompatibilities reported by `gcc -Wtraditional'. 2005-05-03 08:24:30 -07:00
hniksic 52ad80309f [svn] Added NTLM support. 2005-04-06 13:42:22 -07:00
hniksic 4b57f166ae [svn] Use the xzero shorthand for memset(..., 0, ...). 2005-04-01 16:41:04 -08:00