aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-05-29 10:49:00 +0100
committerRon Yorston <rmy@pobox.com>2020-05-29 11:03:33 +0100
commit53c09d0e1720bd927a2995f87df324a9854f1771 (patch)
tree982b357d9d188cfb6a1d488ebaba6c42d818209f /networking
parentd4247a9f03290a96433e18dba538404005a21311 (diff)
parent45fa3f18adf57ef9d743038743d9c90573aeeb91 (diff)
downloadbusybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.tar.gz
busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.tar.bz2
busybox-w32-53c09d0e1720bd927a2995f87df324a9854f1771.zip
Merge branch 'busybox' into mergeFRP-3466-g53c09d0e1
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c6
-rw-r--r--networking/wget.c20
2 files changed, 23 insertions, 3 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index efe57ecf7..eeaa4bec1 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2878,10 +2878,16 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
2878 mingw_daemonize(argv); 2878 mingw_daemonize(argv);
2879#endif 2879#endif
2880 2880
2881 /* Chdir to home (unless we were re-execed for NOMMU case:
2882 * we are already in the home dir then).
2883 */
2881#if ENABLE_PLATFORM_MINGW32 2884#if ENABLE_PLATFORM_MINGW32
2882 if (!(opt & OPT_INETD)) 2885 if (!(opt & OPT_INETD))
2886#else
2887 if (!re_execed)
2883#endif 2888#endif
2884 xchdir(home_httpd); 2889 xchdir(home_httpd);
2890
2885 if (!(opt & OPT_INETD)) { 2891 if (!(opt & OPT_INETD)) {
2886#ifdef SIGCHLD 2892#ifdef SIGCHLD
2887 signal(SIGCHLD, SIG_IGN); 2893 signal(SIGCHLD, SIG_IGN);
diff --git a/networking/wget.c b/networking/wget.c
index 4365c76ce..bc237c4a8 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -91,6 +91,9 @@
91//config: patches, but do want to waste bandwidth expaining how wrong 91//config: patches, but do want to waste bandwidth expaining how wrong
92//config: it is, you will be ignored. 92//config: it is, you will be ignored.
93//config: 93//config:
94//config: FEATURE_WGET_OPENSSL does implement TLS verification
95//config: using the certificates available to OpenSSL.
96//config:
94//config:config FEATURE_WGET_OPENSSL 97//config:config FEATURE_WGET_OPENSSL
95//config: bool "Try to connect to HTTPS using openssl" 98//config: bool "Try to connect to HTTPS using openssl"
96//config: default y 99//config: default y
@@ -115,6 +118,9 @@
115//config: If openssl can't be executed, internal TLS code will be used 118//config: If openssl can't be executed, internal TLS code will be used
116//config: (if you enabled it); if openssl can be executed but fails later, 119//config: (if you enabled it); if openssl can be executed but fails later,
117//config: wget can't detect this, and download will fail. 120//config: wget can't detect this, and download will fail.
121//config:
122//config: By default TLS verification is performed, unless
123//config: --no-check-certificate option is passed.
118 124
119//applet:IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP)) 125//applet:IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP))
120 126
@@ -124,8 +130,11 @@
124//usage: IF_FEATURE_WGET_LONG_OPTIONS( 130//usage: IF_FEATURE_WGET_LONG_OPTIONS(
125//usage: "[-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]\n" 131//usage: "[-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]\n"
126//usage: " [-o|--output-file FILE] [--header 'header: value'] [-Y|--proxy on/off]\n" 132//usage: " [-o|--output-file FILE] [--header 'header: value'] [-Y|--proxy on/off]\n"
133//usage: IF_FEATURE_WGET_OPENSSL(
134//usage: " [--no-check-certificate]\n"
135//usage: )
127/* Since we ignore these opts, we don't show them in --help */ 136/* Since we ignore these opts, we don't show them in --help */
128/* //usage: " [--no-check-certificate] [--no-cache] [--passive-ftp] [-t TRIES]" */ 137/* //usage: " [--no-cache] [--passive-ftp] [-t TRIES]" */
129/* //usage: " [-nv] [-nc] [-nH] [-np]" */ 138/* //usage: " [-nv] [-nc] [-nH] [-np]" */
130//usage: " [-P DIR] [-S|--server-response] [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..." 139//usage: " [-P DIR] [-S|--server-response] [-U|--user-agent AGENT]" IF_FEATURE_WGET_TIMEOUT(" [-T SEC]") " URL..."
131//usage: ) 140//usage: )
@@ -137,7 +146,9 @@
137//usage: "Retrieve files via HTTP or FTP\n" 146//usage: "Retrieve files via HTTP or FTP\n"
138//usage: IF_FEATURE_WGET_LONG_OPTIONS( 147//usage: IF_FEATURE_WGET_LONG_OPTIONS(
139//usage: "\n --spider Only check URL existence: $? is 0 if exists" 148//usage: "\n --spider Only check URL existence: $? is 0 if exists"
140///////: "\n --no-check-certificate Don't validate the server's certificate" 149//usage: IF_FEATURE_WGET_OPENSSL(
150//usage: "\n --no-check-certificate Don't validate the server's certificate"
151//usage: )
141//usage: ) 152//usage: )
142//usage: "\n -c Continue retrieval of aborted transfer" 153//usage: "\n -c Continue retrieval of aborted transfer"
143//usage: "\n -q Quiet" 154//usage: "\n -q Quiet"
@@ -668,7 +679,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
668 pid = xvfork(); 679 pid = xvfork();
669 if (pid == 0) { 680 if (pid == 0) {
670 /* Child */ 681 /* Child */
671 char *argv[8]; 682 char *argv[9];
672 683
673 close(sp[0]); 684 close(sp[0]);
674 xmove_fd(sp[1], 0); 685 xmove_fd(sp[1], 0);
@@ -695,6 +706,9 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
695 argv[5] = (char*)"-servername"; 706 argv[5] = (char*)"-servername";
696 argv[6] = (char*)servername; 707 argv[6] = (char*)servername;
697 } 708 }
709 if (!(option_mask32 & WGET_OPT_NO_CHECK_CERT)) {
710 argv[7] = (char*)"-verify_return_error";
711 }
698 712
699 BB_EXECVP(argv[0], argv); 713 BB_EXECVP(argv[0], argv);
700 xmove_fd(3, 2); 714 xmove_fd(3, 2);