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>
This commit is contained in:
parent
1267770a9d
commit
2b7515722b
@ -806,9 +806,13 @@ static FILE* prepare_ftp_session(FILE **dfpp, struct host_info *target, len_and_
|
|||||||
|
|
||||||
*dfpp = open_socket(lsa);
|
*dfpp = open_socket(lsa);
|
||||||
|
|
||||||
//For encrypted data, need to send "PROT P" and get "200 PROT now Private" response first
|
#if ENABLE_FEATURE_WGET_HTTPS
|
||||||
//Without it (or with "PROT C"), data is sent unencrypted
|
/* "PROT P" enables encryption of data stream.
|
||||||
//spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0);
|
* Without it (or with "PROT C"), data is sent unencrypted.
|
||||||
|
*/
|
||||||
|
if (ftpcmd("PROT P", NULL, sfp) == 200)
|
||||||
|
spawn_ssl_client(target->host, fileno(*dfpp), /*flags*/ 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (G.beg_range != 0) {
|
if (G.beg_range != 0) {
|
||||||
sprintf(G.wget_buf, "REST %"OFF_FMT"u", G.beg_range);
|
sprintf(G.wget_buf, "REST %"OFF_FMT"u", G.beg_range);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user