]> git.armaanb.net Git - asd-repo.git/blob - core/busybox/patches/libressl.patch
Restructure repository
[asd-repo.git] / core / busybox / patches / libressl.patch
1 From a32d2713828bc70762956c9d2f203d2202d1718d Mon Sep 17 00:00:00 2001
2 From: git-bruh <e817509a-8ee9-4332-b0ad-3a6bdf9ab63f@aleeas.com>
3 Date: Wed, 17 Feb 2021 10:42:13 +0530
4 Subject: [PATCH] Revert "wget: fix openssl options for cert verification"
5
6 This reverts commit fc2ce04a38ebfb03f9aeff205979786839cd5a7c.
7 ---
8  networking/wget.c | 21 ++++-----------------
9  1 file changed, 4 insertions(+), 17 deletions(-)
10
11 diff --git a/networking/wget.c b/networking/wget.c
12 index e660c279c..d4a5966b6 100644
13 --- a/networking/wget.c
14 +++ b/networking/wget.c
15 @@ -670,8 +670,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
16         pid = xvfork();
17         if (pid == 0) {
18                 /* Child */
19 -               char *argv[13];
20 -               char **argp;
21 +               char *argv[9];
22  
23                 close(sp[0]);
24                 xmove_fd(sp[1], 0);
25 @@ -694,25 +693,13 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
26                  * TLS server_name (SNI) field are FQDNs (DNS hostnames).
27                  * IPv4 and IPv6 addresses, port numbers are not allowed.
28                  */
29 -               argp = &argv[5];
30                 if (!is_ip_address(servername)) {
31 -                       *argp++ = (char*)"-servername"; //[5]
32 -                       *argp++ = (char*)servername;    //[6]
33 +                       argv[5] = (char*)"-servername";
34 +                       argv[6] = (char*)servername;
35                 }
36                 if (!(option_mask32 & WGET_OPT_NO_CHECK_CERT)) {
37 -                       /* Abort on bad server certificate */
38 -                       *argp++ = (char*)"-verify";              //[7]
39 -                       *argp++ = (char*)"100";                  //[8]
40 -                       *argp++ = (char*)"-verify_return_error"; //[9]
41 -                       if (!is_ip_address(servername)) {
42 -                               *argp++ = (char*)"-verify_hostname"; //[10]
43 -                               *argp++ = (char*)servername;         //[11]
44 -                       } else {
45 -                               *argp++ = (char*)"-verify_ip"; //[10]
46 -                               *argp++ = (char*)host;         //[11]
47 -                       }
48 +                       argv[7] = (char*)"-verify_return_error";
49                 }
50 -               //[12] (or earlier) is NULL terminator
51  
52                 BB_EXECVP(argv[0], argv);
53                 xmove_fd(3, 2);
54 -- 
55 2.30.1
56