diff options
author | Ron Yorston <rmy@pobox.com> | 2018-07-25 10:41:42 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-07-25 10:41:42 +0100 |
commit | 59873514f17cefd6ba3997dad5779f75433fd4e6 (patch) | |
tree | 1c9d0a3450ed95f0b820285b9f9fc217c902e652 /networking/wget.c | |
parent | 779fd5745ac11bf752f5f4b977a274a39c192f90 (diff) | |
parent | 81de30de05beebabfa72f2a01ec4f33e9a1923e3 (diff) | |
download | busybox-w32-59873514f17cefd6ba3997dad5779f75433fd4e6.tar.gz busybox-w32-59873514f17cefd6ba3997dad5779f75433fd4e6.tar.bz2 busybox-w32-59873514f17cefd6ba3997dad5779f75433fd4e6.zip |
Merge branch 'busybox'
Diffstat (limited to 'networking/wget.c')
-rw-r--r-- | networking/wget.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c index 85eae061b..bd2f4edcf 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -137,6 +137,7 @@ | |||
137 | //usage: "Retrieve files via HTTP or FTP\n" | 137 | //usage: "Retrieve files via HTTP or FTP\n" |
138 | //usage: IF_FEATURE_WGET_LONG_OPTIONS( | 138 | //usage: IF_FEATURE_WGET_LONG_OPTIONS( |
139 | //usage: "\n --spider Only check URL existence: $? is 0 if exists" | 139 | //usage: "\n --spider Only check URL existence: $? is 0 if exists" |
140 | ///////: "\n --no-check-certificate Don't validate the server's certificate" | ||
140 | //usage: ) | 141 | //usage: ) |
141 | //usage: "\n -c Continue retrieval of aborted transfer" | 142 | //usage: "\n -c Continue retrieval of aborted transfer" |
142 | //usage: "\n -q Quiet" | 143 | //usage: "\n -q Quiet" |
@@ -271,6 +272,7 @@ enum { | |||
271 | WGET_OPT_HEADER = (1 << 10) * ENABLE_FEATURE_WGET_LONG_OPTIONS, | 272 | WGET_OPT_HEADER = (1 << 10) * ENABLE_FEATURE_WGET_LONG_OPTIONS, |
272 | WGET_OPT_POST_DATA = (1 << 11) * ENABLE_FEATURE_WGET_LONG_OPTIONS, | 273 | WGET_OPT_POST_DATA = (1 << 11) * ENABLE_FEATURE_WGET_LONG_OPTIONS, |
273 | WGET_OPT_SPIDER = (1 << 12) * ENABLE_FEATURE_WGET_LONG_OPTIONS, | 274 | WGET_OPT_SPIDER = (1 << 12) * ENABLE_FEATURE_WGET_LONG_OPTIONS, |
275 | WGET_OPT_NO_CHECK_CERT = (1 << 13) * ENABLE_FEATURE_WGET_LONG_OPTIONS, | ||
274 | }; | 276 | }; |
275 | 277 | ||
276 | enum { | 278 | enum { |
@@ -721,6 +723,9 @@ static void spawn_ssl_client(const char *host, int network_fd, int flags) | |||
721 | int pid; | 723 | int pid; |
722 | char *servername, *p; | 724 | char *servername, *p; |
723 | 725 | ||
726 | if (!(option_mask32 & WGET_OPT_NO_CHECK_CERT)) | ||
727 | bb_error_msg("note: TLS certificate validation not implemented"); | ||
728 | |||
724 | servername = xstrdup(host); | 729 | servername = xstrdup(host); |
725 | p = strrchr(servername, ':'); | 730 | p = strrchr(servername, ':'); |
726 | if (p) *p = '\0'; | 731 | if (p) *p = '\0'; |
@@ -1362,6 +1367,7 @@ However, in real world it was observed that some web servers | |||
1362 | /* server.user remains untouched */ | 1367 | /* server.user remains untouched */ |
1363 | free(server.allocated); | 1368 | free(server.allocated); |
1364 | server.allocated = NULL; | 1369 | server.allocated = NULL; |
1370 | server.protocol = target.protocol; | ||
1365 | server.host = target.host; | 1371 | server.host = target.host; |
1366 | /* strip_ipv6_scope_id(target.host); - no! */ | 1372 | /* strip_ipv6_scope_id(target.host); - no! */ |
1367 | /* we assume remote never gives us IPv6 addr with scope id */ | 1373 | /* we assume remote never gives us IPv6 addr with scope id */ |
@@ -1434,10 +1440,9 @@ IF_DESKTOP( "tries\0" Required_argument "t") | |||
1434 | "header\0" Required_argument "\xff" | 1440 | "header\0" Required_argument "\xff" |
1435 | "post-data\0" Required_argument "\xfe" | 1441 | "post-data\0" Required_argument "\xfe" |
1436 | "spider\0" No_argument "\xfd" | 1442 | "spider\0" No_argument "\xfd" |
1443 | "no-check-certificate\0" No_argument "\xfc" | ||
1437 | /* Ignored (we always use PASV): */ | 1444 | /* Ignored (we always use PASV): */ |
1438 | IF_DESKTOP( "passive-ftp\0" No_argument "\xf0") | 1445 | IF_DESKTOP( "passive-ftp\0" No_argument "\xf0") |
1439 | /* Ignored (we don't do ssl) */ | ||
1440 | IF_DESKTOP( "no-check-certificate\0" No_argument "\xf0") | ||
1441 | /* Ignored (we don't support caching) */ | 1446 | /* Ignored (we don't support caching) */ |
1442 | IF_DESKTOP( "no-cache\0" No_argument "\xf0") | 1447 | IF_DESKTOP( "no-cache\0" No_argument "\xf0") |
1443 | IF_DESKTOP( "no-verbose\0" No_argument "\xf0") | 1448 | IF_DESKTOP( "no-verbose\0" No_argument "\xf0") |
@@ -1497,6 +1502,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | |||
1497 | if (option_mask32 & WGET_OPT_HEADER) bb_error_msg("--header"); | 1502 | if (option_mask32 & WGET_OPT_HEADER) bb_error_msg("--header"); |
1498 | if (option_mask32 & WGET_OPT_POST_DATA) bb_error_msg("--post-data"); | 1503 | if (option_mask32 & WGET_OPT_POST_DATA) bb_error_msg("--post-data"); |
1499 | if (option_mask32 & WGET_OPT_SPIDER) bb_error_msg("--spider"); | 1504 | if (option_mask32 & WGET_OPT_SPIDER) bb_error_msg("--spider"); |
1505 | if (option_mask32 & WGET_OPT_NO_CHECK_CERT) bb_error_msg("--no-check-certificate"); | ||
1500 | exit(0); | 1506 | exit(0); |
1501 | #endif | 1507 | #endif |
1502 | argv += optind; | 1508 | argv += optind; |