diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-08 00:28:30 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-08 00:28:30 +0100 |
commit | 237a900bc5654c865298b33a70dee60e2cd05dbc (patch) | |
tree | a84dbf7146549059c11ffc45f29b48857af06284 | |
parent | 47529d3f165c06bd0c3be751fdd4b743b4bddedb (diff) | |
download | busybox-w32-237a900bc5654c865298b33a70dee60e2cd05dbc.tar.gz busybox-w32-237a900bc5654c865298b33a70dee60e2cd05dbc.tar.bz2 busybox-w32-237a900bc5654c865298b33a70dee60e2cd05dbc.zip |
wget: do not ask for TLS-encrypted downloads on plain ftp:// URLs
function old new delta
wget_main 2422 2431 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/wget.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/networking/wget.c b/networking/wget.c index 633dabb57..95b88ad37 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -807,11 +807,13 @@ static FILE* prepare_ftp_session(FILE **dfpp, struct host_info *target, len_and_ | |||
807 | *dfpp = open_socket(lsa); | 807 | *dfpp = open_socket(lsa); |
808 | 808 | ||
809 | #if ENABLE_FEATURE_WGET_HTTPS | 809 | #if ENABLE_FEATURE_WGET_HTTPS |
810 | /* "PROT P" enables encryption of data stream. | 810 | if (target->protocol == P_FTPS) { |
811 | * Without it (or with "PROT C"), data is sent unencrypted. | 811 | /* "PROT P" enables encryption of data stream. |
812 | */ | 812 | * Without it (or with "PROT C"), data is sent unencrypted. |
813 | if (ftpcmd("PROT P", NULL, sfp) == 200) | 813 | */ |
814 | spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0); | 814 | if (ftpcmd("PROT P", NULL, sfp) == 200) |
815 | spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0); | ||
816 | } | ||
815 | #endif | 817 | #endif |
816 | 818 | ||
817 | if (G.beg_range != 0) { | 819 | if (G.beg_range != 0) { |