diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-11-12 09:05:08 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-11-12 09:05:08 -0600 |
commit | e0397bd78f5d363576a460641eeec972170851d2 (patch) | |
tree | 35da704cd287b674b1a4fd62e71199aecf4b123d | |
parent | acd7ce751ab071d2fd2a4897e198b5ba86ef069f (diff) | |
download | busybox-w32-packaging-e0397bd78f5d363576a460641eeec972170851d2.tar.gz busybox-w32-packaging-e0397bd78f5d363576a460641eeec972170851d2.tar.bz2 busybox-w32-packaging-e0397bd78f5d363576a460641eeec972170851d2.zip |
More debug info
-rw-r--r-- | libressl.patch | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/libressl.patch b/libressl.patch index 9778341..877a2a7 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 | { |
137 | diff --git a/networking/wget.c b/networking/wget.c | 137 | diff --git a/networking/wget.c b/networking/wget.c |
138 | index 6a64836fb..13474abe4 100644 | 138 | index 6a64836fb..55195baf3 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 @@ |
@@ -320,7 +320,7 @@ index 6a64836fb..13474abe4 100644 | |||
320 | /*G.content_len = 0; - redundant, got_clen = 0 is enough */ | 320 | /*G.content_len = 0; - redundant, got_clen = 0 is enough */ |
321 | G.got_clen = 0; | 321 | G.got_clen = 0; |
322 | G.chunked = 0; | 322 | G.chunked = 0; |
323 | @@ -1229,37 +1315,61 @@ static void download_one_url(const char *url) | 323 | @@ -1229,37 +1315,62 @@ static void download_one_url(const char *url) |
324 | 324 | ||
325 | /* Open socket to http(s) server */ | 325 | /* Open socket to http(s) server */ |
326 | #if ENABLE_FEATURE_WGET_OPENSSL | 326 | #if ENABLE_FEATURE_WGET_OPENSSL |
@@ -356,6 +356,7 @@ index 6a64836fb..13474abe4 100644 | |||
356 | + bb_error_msg_and_die("Failed to configure client"); | 356 | + bb_error_msg_and_die("Failed to configure client"); |
357 | + sfp = tmpfile(); | 357 | + sfp = tmpfile(); |
358 | + dfp = tmpfile(); | 358 | + dfp = tmpfile(); |
359 | + printf("TLS connection to %s", servername); | ||
359 | + if(tls_connect_fds(ctx, dfp, sfp, servername) != 0) | 360 | + if(tls_connect_fds(ctx, dfp, sfp, servername) != 0) |
360 | + bb_error_msg_and_die("Failed to connect: %s", tls_error(ctx)); | 361 | + bb_error_msg_and_die("Failed to connect: %s", tls_error(ctx)); |
361 | + tls_config_free(config); | 362 | + tls_config_free(config); |
@@ -395,7 +396,7 @@ index 6a64836fb..13474abe4 100644 | |||
395 | /* Send HTTP request */ | 396 | /* Send HTTP request */ |
396 | if (use_proxy) { | 397 | if (use_proxy) { |
397 | SENDFMT(sfp, "GET %s://%s/%s HTTP/1.1\r\n", | 398 | SENDFMT(sfp, "GET %s://%s/%s HTTP/1.1\r\n", |
398 | @@ -1270,6 +1380,7 @@ static void download_one_url(const char *url) | 399 | @@ -1270,6 +1381,7 @@ static void download_one_url(const char *url) |
399 | (option_mask32 & WGET_OPT_POST) ? "POST" : "GET", | 400 | (option_mask32 & WGET_OPT_POST) ? "POST" : "GET", |
400 | target.path); | 401 | target.path); |
401 | } | 402 | } |
@@ -403,7 +404,7 @@ index 6a64836fb..13474abe4 100644 | |||
403 | if (!USR_HEADER_HOST) | 404 | if (!USR_HEADER_HOST) |
404 | SENDFMT(sfp, "Host: %s\r\n", target.host); | 405 | SENDFMT(sfp, "Host: %s\r\n", target.host); |
405 | if (!USR_HEADER_USER_AGENT) | 406 | if (!USR_HEADER_USER_AGENT) |
406 | @@ -1280,6 +1391,7 @@ static void download_one_url(const char *url) | 407 | @@ -1280,6 +1392,7 @@ static void download_one_url(const char *url) |
407 | */ | 408 | */ |
408 | SENDFMT(sfp, "Connection: close\r\n"); | 409 | SENDFMT(sfp, "Connection: close\r\n"); |
409 | 410 | ||
@@ -411,7 +412,7 @@ index 6a64836fb..13474abe4 100644 | |||
411 | #if ENABLE_FEATURE_WGET_AUTHENTICATION | 412 | #if ENABLE_FEATURE_WGET_AUTHENTICATION |
412 | if (target.user && !USR_HEADER_AUTH) { | 413 | if (target.user && !USR_HEADER_AUTH) { |
413 | SENDFMT(sfp, "Proxy-Authorization: Basic %s\r\n"+6, | 414 | SENDFMT(sfp, "Proxy-Authorization: Basic %s\r\n"+6, |
414 | @@ -1291,6 +1403,7 @@ static void download_one_url(const char *url) | 415 | @@ -1291,6 +1404,7 @@ static void download_one_url(const char *url) |
415 | } | 416 | } |
416 | #endif | 417 | #endif |
417 | 418 | ||
@@ -419,7 +420,7 @@ index 6a64836fb..13474abe4 100644 | |||
419 | if (G.beg_range != 0 && !USR_HEADER_RANGE) | 420 | if (G.beg_range != 0 && !USR_HEADER_RANGE) |
420 | SENDFMT(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); | 421 | SENDFMT(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); |
421 | 422 | ||
422 | @@ -1300,6 +1413,7 @@ static void download_one_url(const char *url) | 423 | @@ -1300,6 +1414,7 @@ static void download_one_url(const char *url) |
423 | fputs(G.extra_headers, sfp); | 424 | fputs(G.extra_headers, sfp); |
424 | } | 425 | } |
425 | 426 | ||
@@ -427,7 +428,7 @@ index 6a64836fb..13474abe4 100644 | |||
427 | if (option_mask32 & WGET_OPT_POST_FILE) { | 428 | if (option_mask32 & WGET_OPT_POST_FILE) { |
428 | int fd = xopen_stdin(G.post_file); | 429 | int fd = xopen_stdin(G.post_file); |
429 | G.post_data = xmalloc_read(fd, NULL); | 430 | G.post_data = xmalloc_read(fd, NULL); |
430 | @@ -1314,15 +1428,18 @@ static void download_one_url(const char *url) | 431 | @@ -1314,15 +1429,18 @@ static void download_one_url(const char *url) |
431 | ); | 432 | ); |
432 | } | 433 | } |
433 | # if ENABLE_PLATFORM_MINGW32 | 434 | # if ENABLE_PLATFORM_MINGW32 |
@@ -446,7 +447,7 @@ index 6a64836fb..13474abe4 100644 | |||
446 | } else | 447 | } else |
447 | # else | 448 | # else |
448 | SENDFMT(sfp, | 449 | SENDFMT(sfp, |
449 | @@ -1338,6 +1455,7 @@ static void download_one_url(const char *url) | 450 | @@ -1338,6 +1456,7 @@ static void download_one_url(const char *url) |
450 | SENDFMT(sfp, "\r\n"); | 451 | SENDFMT(sfp, "\r\n"); |
451 | } | 452 | } |
452 | 453 | ||
@@ -454,7 +455,7 @@ index 6a64836fb..13474abe4 100644 | |||
454 | fflush(sfp); | 455 | fflush(sfp); |
455 | 456 | ||
456 | /* Tried doing this unconditionally. | 457 | /* Tried doing this unconditionally. |
457 | @@ -1345,27 +1463,38 @@ static void download_one_url(const char *url) | 458 | @@ -1345,27 +1464,38 @@ static void download_one_url(const char *url) |
458 | */ | 459 | */ |
459 | #if SSL_SUPPORTED | 460 | #if SSL_SUPPORTED |
460 | if (target.protocol == P_HTTPS) { | 461 | if (target.protocol == P_HTTPS) { |
@@ -493,7 +494,7 @@ index 6a64836fb..13474abe4 100644 | |||
493 | switch (status) { | 494 | switch (status) { |
494 | case 0: | 495 | case 0: |
495 | case 100: | 496 | case 100: |
496 | @@ -1441,6 +1570,7 @@ However, in real world it was observed that some web servers | 497 | @@ -1441,6 +1571,7 @@ However, in real world it was observed that some web servers |
497 | /* | 498 | /* |
498 | * Retrieve HTTP headers. | 499 | * Retrieve HTTP headers. |
499 | */ | 500 | */ |
@@ -501,7 +502,7 @@ index 6a64836fb..13474abe4 100644 | |||
501 | while ((str = get_sanitized_hdr(sfp)) != NULL) { | 502 | while ((str = get_sanitized_hdr(sfp)) != NULL) { |
502 | static const char keywords[] ALIGN1 = | 503 | static const char keywords[] ALIGN1 = |
503 | "content-length\0""transfer-encoding\0""location\0"; | 504 | "content-length\0""transfer-encoding\0""location\0"; |
504 | @@ -1497,6 +1627,7 @@ However, in real world it was observed that some web servers | 505 | @@ -1497,6 +1628,7 @@ However, in real world it was observed that some web servers |
505 | goto establish_session; | 506 | goto establish_session; |
506 | } | 507 | } |
507 | } | 508 | } |
@@ -509,7 +510,7 @@ index 6a64836fb..13474abe4 100644 | |||
509 | // if (status >= 300) | 510 | // if (status >= 300) |
510 | // bb_error_msg_and_die("bad redirection (no Location: header from server)"); | 511 | // bb_error_msg_and_die("bad redirection (no Location: header from server)"); |
511 | 512 | ||
512 | @@ -1514,6 +1645,7 @@ However, in real world it was observed that some web servers | 513 | @@ -1514,6 +1646,7 @@ However, in real world it was observed that some web servers |
513 | 514 | ||
514 | free(lsa); | 515 | free(lsa); |
515 | 516 | ||
@@ -517,7 +518,7 @@ index 6a64836fb..13474abe4 100644 | |||
517 | if (!(option_mask32 & WGET_OPT_SPIDER)) { | 518 | if (!(option_mask32 & WGET_OPT_SPIDER)) { |
518 | if (G.output_fd < 0) | 519 | if (G.output_fd < 0) |
519 | G.output_fd = xopen(G.fname_out, G.o_flags); | 520 | G.output_fd = xopen(G.fname_out, G.o_flags); |
520 | @@ -1536,6 +1668,7 @@ However, in real world it was observed that some web servers | 521 | @@ -1536,6 +1669,7 @@ However, in real world it was observed that some web servers |
521 | /* ftpcmd("QUIT", NULL, sfp); - why bother? */ | 522 | /* ftpcmd("QUIT", NULL, sfp); - why bother? */ |
522 | } | 523 | } |
523 | #endif | 524 | #endif |
@@ -525,7 +526,7 @@ index 6a64836fb..13474abe4 100644 | |||
525 | fclose(sfp); | 526 | fclose(sfp); |
526 | 527 | ||
527 | free(server.allocated); | 528 | free(server.allocated); |
528 | @@ -1544,11 +1677,13 @@ However, in real world it was observed that some web servers | 529 | @@ -1544,11 +1678,13 @@ However, in real world it was observed that some web servers |
529 | free(target.user); | 530 | free(target.user); |
530 | free(fname_out_alloc); | 531 | free(fname_out_alloc); |
531 | free(redirected_path); | 532 | free(redirected_path); |
@@ -539,7 +540,7 @@ index 6a64836fb..13474abe4 100644 | |||
539 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS | 540 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS |
540 | static const char wget_longopts[] ALIGN1 = | 541 | static const char wget_longopts[] ALIGN1 = |
541 | /* name, has_arg, val */ | 542 | /* name, has_arg, val */ |
542 | @@ -1590,6 +1725,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 543 | @@ -1590,6 +1726,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
543 | #endif | 544 | #endif |
544 | 545 | ||
545 | INIT_G(); | 546 | INIT_G(); |
@@ -547,7 +548,7 @@ index 6a64836fb..13474abe4 100644 | |||
547 | 548 | ||
548 | #if ENABLE_FEATURE_WGET_TIMEOUT | 549 | #if ENABLE_FEATURE_WGET_TIMEOUT |
549 | G.timeout_seconds = 900; | 550 | G.timeout_seconds = 900; |
550 | @@ -1626,6 +1762,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 551 | @@ -1626,6 +1763,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
551 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) | 552 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) |
552 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file) | 553 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file) |
553 | ); | 554 | ); |
@@ -556,7 +557,7 @@ index 6a64836fb..13474abe4 100644 | |||
556 | #if 0 /* option bits debug */ | 557 | #if 0 /* option bits debug */ |
557 | if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM"); | 558 | if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM"); |
558 | if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething"); | 559 | if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething"); |
559 | @@ -1670,6 +1808,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 560 | @@ -1670,6 +1809,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
560 | } | 561 | } |
561 | #endif | 562 | #endif |
562 | 563 | ||
@@ -564,7 +565,7 @@ index 6a64836fb..13474abe4 100644 | |||
564 | G.output_fd = -1; | 565 | G.output_fd = -1; |
565 | G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL; | 566 | G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL; |
566 | if (G.fname_out) { /* -O FILE ? */ | 567 | if (G.fname_out) { /* -O FILE ? */ |
567 | @@ -1691,8 +1830,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 568 | @@ -1691,8 +1831,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
568 | } | 569 | } |
569 | } | 570 | } |
570 | 571 | ||