summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-11-12 16:23:00 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-11-12 16:23:00 -0600
commitca9f7cd4bbaef2c0455abafaebbcda632f811654 (patch)
tree13e9447312278eed3837f4fc4e9655883d4e1250
parentcdf78b218a9f6c5875a7a3e697c8b036b1c3a014 (diff)
downloadbusybox-w32-packaging-ca9f7cd4bbaef2c0455abafaebbcda632f811654.tar.gz
busybox-w32-packaging-ca9f7cd4bbaef2c0455abafaebbcda632f811654.tar.bz2
busybox-w32-packaging-ca9f7cd4bbaef2c0455abafaebbcda632f811654.zip
set path and file
-rw-r--r--libressl.patch38
1 files changed, 20 insertions, 18 deletions
diff --git a/libressl.patch b/libressl.patch
index b956bc2..8cec908 100644
--- a/libressl.patch
+++ b/libressl.patch
@@ -135,7 +135,7 @@ index 9f1dd67ec..7e8da6df2 100644
135 static void tls_xwrite(tls_state_t *tls, int len) 135 static void tls_xwrite(tls_state_t *tls, int len)
136 { 136 {
137diff --git a/networking/wget.c b/networking/wget.c 137diff --git a/networking/wget.c b/networking/wget.c
138index 6a64836fb..404e55eff 100644 138index 6a64836fb..330c231c8 100644
139--- a/networking/wget.c 139--- a/networking/wget.c
140+++ b/networking/wget.c 140+++ b/networking/wget.c
141@@ -169,7 +169,11 @@ 141@@ -169,7 +169,11 @@
@@ -374,7 +374,7 @@ index 6a64836fb..404e55eff 100644
374 /*G.content_len = 0; - redundant, got_clen = 0 is enough */ 374 /*G.content_len = 0; - redundant, got_clen = 0 is enough */
375 G.got_clen = 0; 375 G.got_clen = 0;
376 G.chunked = 0; 376 G.chunked = 0;
377@@ -1229,37 +1356,62 @@ static void download_one_url(const char *url) 377@@ -1229,37 +1356,64 @@ static void download_one_url(const char *url)
378 378
379 /* Open socket to http(s) server */ 379 /* Open socket to http(s) server */
380 #if ENABLE_FEATURE_WGET_OPENSSL 380 #if ENABLE_FEATURE_WGET_OPENSSL
@@ -405,6 +405,8 @@ index 6a64836fb..404e55eff 100644
405+ if(config == NULL) 405+ if(config == NULL)
406+ bb_error_msg_and_die("Out of memory 2"); 406+ bb_error_msg_and_die("Out of memory 2");
407+ if(tls_config_set_ca_path(config, "certs") != 0) 407+ if(tls_config_set_ca_path(config, "certs") != 0)
408+ bb_error_msg_and_die("Failed to set ca path");
409+ if(tls_config_set_ca_file(config, "cert.pem") != 0)
408+ bb_error_msg_and_die("Failed to set ca file"); 410+ bb_error_msg_and_die("Failed to set ca file");
409+ if(tls_configure(ctx,config) != 0) 411+ if(tls_configure(ctx,config) != 0)
410+ bb_error_msg_and_die("Failed to configure client"); 412+ bb_error_msg_and_die("Failed to configure client");
@@ -450,7 +452,7 @@ index 6a64836fb..404e55eff 100644
450 /* Send HTTP request */ 452 /* Send HTTP request */
451 if (use_proxy) { 453 if (use_proxy) {
452 SENDFMT(sfp, "GET %s://%s/%s HTTP/1.1\r\n", 454 SENDFMT(sfp, "GET %s://%s/%s HTTP/1.1\r\n",
453@@ -1270,6 +1422,7 @@ static void download_one_url(const char *url) 455@@ -1270,6 +1424,7 @@ static void download_one_url(const char *url)
454 (option_mask32 & WGET_OPT_POST) ? "POST" : "GET", 456 (option_mask32 & WGET_OPT_POST) ? "POST" : "GET",
455 target.path); 457 target.path);
456 } 458 }
@@ -458,7 +460,7 @@ index 6a64836fb..404e55eff 100644
458 if (!USR_HEADER_HOST) 460 if (!USR_HEADER_HOST)
459 SENDFMT(sfp, "Host: %s\r\n", target.host); 461 SENDFMT(sfp, "Host: %s\r\n", target.host);
460 if (!USR_HEADER_USER_AGENT) 462 if (!USR_HEADER_USER_AGENT)
461@@ -1280,6 +1433,7 @@ static void download_one_url(const char *url) 463@@ -1280,6 +1435,7 @@ static void download_one_url(const char *url)
462 */ 464 */
463 SENDFMT(sfp, "Connection: close\r\n"); 465 SENDFMT(sfp, "Connection: close\r\n");
464 466
@@ -466,7 +468,7 @@ index 6a64836fb..404e55eff 100644
466 #if ENABLE_FEATURE_WGET_AUTHENTICATION 468 #if ENABLE_FEATURE_WGET_AUTHENTICATION
467 if (target.user && !USR_HEADER_AUTH) { 469 if (target.user && !USR_HEADER_AUTH) {
468 SENDFMT(sfp, "Proxy-Authorization: Basic %s\r\n"+6, 470 SENDFMT(sfp, "Proxy-Authorization: Basic %s\r\n"+6,
469@@ -1291,6 +1445,7 @@ static void download_one_url(const char *url) 471@@ -1291,6 +1447,7 @@ static void download_one_url(const char *url)
470 } 472 }
471 #endif 473 #endif
472 474
@@ -474,7 +476,7 @@ index 6a64836fb..404e55eff 100644
474 if (G.beg_range != 0 && !USR_HEADER_RANGE) 476 if (G.beg_range != 0 && !USR_HEADER_RANGE)
475 SENDFMT(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); 477 SENDFMT(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range);
476 478
477@@ -1300,6 +1455,7 @@ static void download_one_url(const char *url) 479@@ -1300,6 +1457,7 @@ static void download_one_url(const char *url)
478 fputs(G.extra_headers, sfp); 480 fputs(G.extra_headers, sfp);
479 } 481 }
480 482
@@ -482,7 +484,7 @@ index 6a64836fb..404e55eff 100644
482 if (option_mask32 & WGET_OPT_POST_FILE) { 484 if (option_mask32 & WGET_OPT_POST_FILE) {
483 int fd = xopen_stdin(G.post_file); 485 int fd = xopen_stdin(G.post_file);
484 G.post_data = xmalloc_read(fd, NULL); 486 G.post_data = xmalloc_read(fd, NULL);
485@@ -1314,15 +1470,18 @@ static void download_one_url(const char *url) 487@@ -1314,15 +1472,18 @@ static void download_one_url(const char *url)
486 ); 488 );
487 } 489 }
488 # if ENABLE_PLATFORM_MINGW32 490 # if ENABLE_PLATFORM_MINGW32
@@ -501,7 +503,7 @@ index 6a64836fb..404e55eff 100644
501 } else 503 } else
502 # else 504 # else
503 SENDFMT(sfp, 505 SENDFMT(sfp,
504@@ -1338,6 +1497,7 @@ static void download_one_url(const char *url) 506@@ -1338,6 +1499,7 @@ static void download_one_url(const char *url)
505 SENDFMT(sfp, "\r\n"); 507 SENDFMT(sfp, "\r\n");
506 } 508 }
507 509
@@ -509,7 +511,7 @@ index 6a64836fb..404e55eff 100644
509 fflush(sfp); 511 fflush(sfp);
510 512
511 /* Tried doing this unconditionally. 513 /* Tried doing this unconditionally.
512@@ -1345,31 +1505,60 @@ static void download_one_url(const char *url) 514@@ -1345,31 +1507,60 @@ static void download_one_url(const char *url)
513 */ 515 */
514 #if SSL_SUPPORTED 516 #if SSL_SUPPORTED
515 if (target.protocol == P_HTTPS) { 517 if (target.protocol == P_HTTPS) {
@@ -573,7 +575,7 @@ index 6a64836fb..404e55eff 100644
573 /* eat all remaining headers */; 575 /* eat all remaining headers */;
574 goto read_response; 576 goto read_response;
575 577
576@@ -1441,7 +1630,8 @@ However, in real world it was observed that some web servers 578@@ -1441,7 +1632,8 @@ However, in real world it was observed that some web servers
577 /* 579 /*
578 * Retrieve HTTP headers. 580 * Retrieve HTTP headers.
579 */ 581 */
@@ -583,7 +585,7 @@ index 6a64836fb..404e55eff 100644
583 static const char keywords[] ALIGN1 = 585 static const char keywords[] ALIGN1 =
584 "content-length\0""transfer-encoding\0""location\0"; 586 "content-length\0""transfer-encoding\0""location\0";
585 enum { 587 enum {
586@@ -1497,6 +1687,7 @@ However, in real world it was observed that some web servers 588@@ -1497,6 +1689,7 @@ However, in real world it was observed that some web servers
587 goto establish_session; 589 goto establish_session;
588 } 590 }
589 } 591 }
@@ -591,7 +593,7 @@ index 6a64836fb..404e55eff 100644
591 // if (status >= 300) 593 // if (status >= 300)
592 // bb_error_msg_and_die("bad redirection (no Location: header from server)"); 594 // bb_error_msg_and_die("bad redirection (no Location: header from server)");
593 595
594@@ -1514,6 +1705,7 @@ However, in real world it was observed that some web servers 596@@ -1514,6 +1707,7 @@ However, in real world it was observed that some web servers
595 597
596 free(lsa); 598 free(lsa);
597 599
@@ -599,7 +601,7 @@ index 6a64836fb..404e55eff 100644
599 if (!(option_mask32 & WGET_OPT_SPIDER)) { 601 if (!(option_mask32 & WGET_OPT_SPIDER)) {
600 if (G.output_fd < 0) 602 if (G.output_fd < 0)
601 G.output_fd = xopen(G.fname_out, G.o_flags); 603 G.output_fd = xopen(G.fname_out, G.o_flags);
602@@ -1536,6 +1728,7 @@ However, in real world it was observed that some web servers 604@@ -1536,6 +1730,7 @@ However, in real world it was observed that some web servers
603 /* ftpcmd("QUIT", NULL, sfp); - why bother? */ 605 /* ftpcmd("QUIT", NULL, sfp); - why bother? */
604 } 606 }
605 #endif 607 #endif
@@ -607,7 +609,7 @@ index 6a64836fb..404e55eff 100644
607 fclose(sfp); 609 fclose(sfp);
608 610
609 free(server.allocated); 611 free(server.allocated);
610@@ -1544,11 +1737,13 @@ However, in real world it was observed that some web servers 612@@ -1544,11 +1739,13 @@ However, in real world it was observed that some web servers
611 free(target.user); 613 free(target.user);
612 free(fname_out_alloc); 614 free(fname_out_alloc);
613 free(redirected_path); 615 free(redirected_path);
@@ -621,7 +623,7 @@ index 6a64836fb..404e55eff 100644
621 #if ENABLE_FEATURE_WGET_LONG_OPTIONS 623 #if ENABLE_FEATURE_WGET_LONG_OPTIONS
622 static const char wget_longopts[] ALIGN1 = 624 static const char wget_longopts[] ALIGN1 =
623 /* name, has_arg, val */ 625 /* name, has_arg, val */
624@@ -1590,6 +1785,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 626@@ -1590,6 +1787,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
625 #endif 627 #endif
626 628
627 INIT_G(); 629 INIT_G();
@@ -629,7 +631,7 @@ index 6a64836fb..404e55eff 100644
629 631
630 #if ENABLE_FEATURE_WGET_TIMEOUT 632 #if ENABLE_FEATURE_WGET_TIMEOUT
631 G.timeout_seconds = 900; 633 G.timeout_seconds = 900;
632@@ -1626,6 +1822,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 634@@ -1626,6 +1824,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
633 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) 635 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data)
634 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file) 636 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file)
635 ); 637 );
@@ -638,7 +640,7 @@ index 6a64836fb..404e55eff 100644
638 #if 0 /* option bits debug */ 640 #if 0 /* option bits debug */
639 if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM"); 641 if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM");
640 if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething"); 642 if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething");
641@@ -1670,6 +1868,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 643@@ -1670,6 +1870,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
642 } 644 }
643 #endif 645 #endif
644 646
@@ -646,7 +648,7 @@ index 6a64836fb..404e55eff 100644
646 G.output_fd = -1; 648 G.output_fd = -1;
647 G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL; 649 G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL;
648 if (G.fname_out) { /* -O FILE ? */ 650 if (G.fname_out) { /* -O FILE ? */
649@@ -1691,8 +1890,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 651@@ -1691,8 +1892,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
650 } 652 }
651 } 653 }
652 654