aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-05-28 14:36:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-05-28 14:36:26 +0200
commit0972c7f7a570c38edb68e1c60a45614b7a7c7d55 (patch)
treea88c9e35ecc6cf5bad1d0fa5f48faac8794477ad
parent8bc418f07eab79a9c8d26594629799f6157a9466 (diff)
downloadbusybox-w32-0972c7f7a570c38edb68e1c60a45614b7a7c7d55.tar.gz
busybox-w32-0972c7f7a570c38edb68e1c60a45614b7a7c7d55.tar.bz2
busybox-w32-0972c7f7a570c38edb68e1c60a45614b7a7c7d55.zip
wget: emit a message that certificate verification is not implemented
function old new delta spawn_ssl_client 185 209 +24 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/wget.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 30c339244..8103aacee 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
276enum { 278enum {
@@ -714,6 +716,9 @@ static void spawn_ssl_client(const char *host, int network_fd, int flags)
714 int pid; 716 int pid;
715 char *servername, *p; 717 char *servername, *p;
716 718
719 if (!(option_mask32 & WGET_OPT_NO_CHECK_CERT))
720 bb_error_msg("note: TLS certificate validation not implemented");
721
717 servername = xstrdup(host); 722 servername = xstrdup(host);
718 p = strrchr(servername, ':'); 723 p = strrchr(servername, ':');
719 if (p) *p = '\0'; 724 if (p) *p = '\0';
@@ -1402,10 +1407,9 @@ IF_DESKTOP( "tries\0" Required_argument "t")
1402 "header\0" Required_argument "\xff" 1407 "header\0" Required_argument "\xff"
1403 "post-data\0" Required_argument "\xfe" 1408 "post-data\0" Required_argument "\xfe"
1404 "spider\0" No_argument "\xfd" 1409 "spider\0" No_argument "\xfd"
1410 "no-check-certificate\0" No_argument "\xfc"
1405 /* Ignored (we always use PASV): */ 1411 /* Ignored (we always use PASV): */
1406IF_DESKTOP( "passive-ftp\0" No_argument "\xf0") 1412IF_DESKTOP( "passive-ftp\0" No_argument "\xf0")
1407 /* Ignored (we don't do ssl) */
1408IF_DESKTOP( "no-check-certificate\0" No_argument "\xf0")
1409 /* Ignored (we don't support caching) */ 1413 /* Ignored (we don't support caching) */
1410IF_DESKTOP( "no-cache\0" No_argument "\xf0") 1414IF_DESKTOP( "no-cache\0" No_argument "\xf0")
1411IF_DESKTOP( "no-verbose\0" No_argument "\xf0") 1415IF_DESKTOP( "no-verbose\0" No_argument "\xf0")
@@ -1465,6 +1469,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
1465 if (option_mask32 & WGET_OPT_HEADER) bb_error_msg("--header"); 1469 if (option_mask32 & WGET_OPT_HEADER) bb_error_msg("--header");
1466 if (option_mask32 & WGET_OPT_POST_DATA) bb_error_msg("--post-data"); 1470 if (option_mask32 & WGET_OPT_POST_DATA) bb_error_msg("--post-data");
1467 if (option_mask32 & WGET_OPT_SPIDER) bb_error_msg("--spider"); 1471 if (option_mask32 & WGET_OPT_SPIDER) bb_error_msg("--spider");
1472 if (option_mask32 & WGET_OPT_NO_CHECK_CERT) bb_error_msg("--no-check-certificate");
1468 exit(0); 1473 exit(0);
1469#endif 1474#endif
1470 argv += optind; 1475 argv += optind;