kiss-mfavila-small/ports/official/extra/busybox/patches/libressl.patch

57 lines
1.8 KiB
Diff

From a32d2713828bc70762956c9d2f203d2202d1718d Mon Sep 17 00:00:00 2001
From: git-bruh <e817509a-8ee9-4332-b0ad-3a6bdf9ab63f@aleeas.com>
Date: Wed, 17 Feb 2021 10:42:13 +0530
Subject: [PATCH] Revert "wget: fix openssl options for cert verification"
This reverts commit fc2ce04a38ebfb03f9aeff205979786839cd5a7c.
---
networking/wget.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/networking/wget.c b/networking/wget.c
index e660c279c..d4a5966b6 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -670,8 +670,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
pid = xvfork();
if (pid == 0) {
/* Child */
- char *argv[13];
- char **argp;
+ char *argv[9];
close(sp[0]);
xmove_fd(sp[1], 0);
@@ -694,25 +693,13 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
* TLS server_name (SNI) field are FQDNs (DNS hostnames).
* IPv4 and IPv6 addresses, port numbers are not allowed.
*/
- argp = &argv[5];
if (!is_ip_address(servername)) {
- *argp++ = (char*)"-servername"; //[5]
- *argp++ = (char*)servername; //[6]
+ argv[5] = (char*)"-servername";
+ argv[6] = (char*)servername;
}
if (!(option_mask32 & WGET_OPT_NO_CHECK_CERT)) {
- /* Abort on bad server certificate */
- *argp++ = (char*)"-verify"; //[7]
- *argp++ = (char*)"100"; //[8]
- *argp++ = (char*)"-verify_return_error"; //[9]
- if (!is_ip_address(servername)) {
- *argp++ = (char*)"-verify_hostname"; //[10]
- *argp++ = (char*)servername; //[11]
- } else {
- *argp++ = (char*)"-verify_ip"; //[10]
- *argp++ = (char*)host; //[11]
- }
+ argv[7] = (char*)"-verify_return_error";
}
- //[12] (or earlier) is NULL terminator
BB_EXECVP(argv[0], argv);
xmove_fd(3, 2);
--
2.30.1