aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-02-06 20:49:27 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-02-06 20:49:27 +0100
commit2b7515722b929794f2f8563b80d9cea48f6b3304 (patch)
tree70bc85b5c0625927721d349fc61990588250b76d
parent1267770a9db90b2a29553e682e3b63aa86b0b34d (diff)
downloadbusybox-w32-2b7515722b929794f2f8563b80d9cea48f6b3304.tar.gz
busybox-w32-2b7515722b929794f2f8563b80d9cea48f6b3304.tar.bz2
busybox-w32-2b7515722b929794f2f8563b80d9cea48f6b3304.zip
wget: attempt to negotiate encrypted data ftps stream ("PROT P")
function old new delta wget_main 2382 2422 +40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/wget.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 7ca4bfb33..633dabb57 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -806,9 +806,13 @@ static FILE* prepare_ftp_session(FILE **dfpp, struct host_info *target, len_and_
806 806
807 *dfpp = open_socket(lsa); 807 *dfpp = open_socket(lsa);
808 808
809 //For encrypted data, need to send "PROT P" and get "200 PROT now Private" response first 809#if ENABLE_FEATURE_WGET_HTTPS
810 //Without it (or with "PROT C"), data is sent unencrypted 810 /* "PROT P" enables encryption of data stream.
811 //spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0); 811 * Without it (or with "PROT C"), data is sent unencrypted.
812 */
813 if (ftpcmd("PROT P", NULL, sfp) == 200)
814 spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0);
815#endif
812 816
813 if (G.beg_range != 0) { 817 if (G.beg_range != 0) {
814 sprintf(G.wget_buf, "REST %"OFF_FMT"u", G.beg_range); 818 sprintf(G.wget_buf, "REST %"OFF_FMT"u", G.beg_range);