diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-11-21 16:14:09 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-11-21 16:14:09 -0600 |
commit | b358ba2d731e91f02e395b4f151fed49660306f4 (patch) | |
tree | 2a069d3584bc5848f2dbf745ca9e6cb6bddb51fb | |
parent | 5cc677721caa0fc1df9002b0ceba4a3452a37b6c (diff) | |
download | busybox-w32-packaging-b358ba2d731e91f02e395b4f151fed49660306f4.tar.gz busybox-w32-packaging-b358ba2d731e91f02e395b4f151fed49660306f4.tar.bz2 busybox-w32-packaging-b358ba2d731e91f02e395b4f151fed49660306f4.zip |
More debugging
-rw-r--r-- | libressl.patch | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/libressl.patch b/libressl.patch index bfd3d20..64365b7 100644 --- a/libressl.patch +++ b/libressl.patch | |||
@@ -102,7 +102,7 @@ index 9f1dd67ec..60e1afe99 100644 | |||
102 | static void tls_xwrite(tls_state_t *tls, int len) | 102 | static void tls_xwrite(tls_state_t *tls, int len) |
103 | { | 103 | { |
104 | diff --git a/networking/wget.c b/networking/wget.c | 104 | diff --git a/networking/wget.c b/networking/wget.c |
105 | index 6a64836fb..ad352586e 100644 | 105 | index 6a64836fb..eafc0a2f2 100644 |
106 | --- a/networking/wget.c | 106 | --- a/networking/wget.c |
107 | +++ b/networking/wget.c | 107 | +++ b/networking/wget.c |
108 | @@ -1,4 +1,3 @@ | 108 | @@ -1,4 +1,3 @@ |
@@ -120,7 +120,7 @@ index 6a64836fb..ad352586e 100644 | |||
120 | #if ENABLE_FEATURE_WGET_TIMEOUT | 120 | #if ENABLE_FEATURE_WGET_TIMEOUT |
121 | unsigned timeout_seconds; | 121 | unsigned timeout_seconds; |
122 | smallint die_if_timed_out; | 122 | smallint die_if_timed_out; |
123 | @@ -460,6 +462,68 @@ static FILE *open_socket(len_and_sockaddr *lsa) | 123 | @@ -460,6 +462,69 @@ static FILE *open_socket(len_and_sockaddr *lsa) |
124 | return fp; | 124 | return fp; |
125 | } | 125 | } |
126 | 126 | ||
@@ -142,6 +142,7 @@ index 6a64836fb..ad352586e 100644 | |||
142 | + char *tmpfilename = tmpnam(NULL); | 142 | + char *tmpfilename = tmpnam(NULL); |
143 | + if(tmpfilename == NULL) | 143 | + if(tmpfilename == NULL) |
144 | + bb_error_msg_and_die("Failed to get a temp file name."); | 144 | + bb_error_msg_and_die("Failed to get a temp file name."); |
145 | + printf("Useing tmpfile %s\n",tmpfilename); | ||
145 | + pemfile = fopen(tmpfilename, "w+"); | 146 | + pemfile = fopen(tmpfilename, "w+"); |
146 | + if(pemfile == NULL) | 147 | + if(pemfile == NULL) |
147 | + bb_error_msg_and_die("Failed to open pem tempfile: %s", strerror(errno)); | 148 | + bb_error_msg_and_die("Failed to open pem tempfile: %s", strerror(errno)); |
@@ -189,7 +190,7 @@ index 6a64836fb..ad352586e 100644 | |||
189 | /* We balk at any control chars in other side's messages. | 190 | /* We balk at any control chars in other side's messages. |
190 | * This prevents nasty surprises (e.g. ESC sequences) in "Location:" URLs | 191 | * This prevents nasty surprises (e.g. ESC sequences) in "Location:" URLs |
191 | * and error messages. | 192 | * and error messages. |
192 | @@ -689,6 +753,7 @@ static void reset_beg_range_to_zero(void) | 193 | @@ -689,6 +754,7 @@ static void reset_beg_range_to_zero(void) |
193 | } | 194 | } |
194 | 195 | ||
195 | #if ENABLE_FEATURE_WGET_OPENSSL | 196 | #if ENABLE_FEATURE_WGET_OPENSSL |
@@ -197,7 +198,7 @@ index 6a64836fb..ad352586e 100644 | |||
197 | static int spawn_https_helper_openssl(const char *host, unsigned port) | 198 | static int spawn_https_helper_openssl(const char *host, unsigned port) |
198 | { | 199 | { |
199 | char *allocated = NULL; | 200 | char *allocated = NULL; |
200 | @@ -698,7 +763,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) | 201 | @@ -698,7 +764,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) |
201 | IF_FEATURE_WGET_HTTPS(volatile int child_failed = 0;) | 202 | IF_FEATURE_WGET_HTTPS(volatile int child_failed = 0;) |
202 | 203 | ||
203 | if (socketpair(AF_UNIX, SOCK_STREAM, 0, sp) != 0) | 204 | if (socketpair(AF_UNIX, SOCK_STREAM, 0, sp) != 0) |
@@ -206,7 +207,7 @@ index 6a64836fb..ad352586e 100644 | |||
206 | bb_simple_perror_msg_and_die("socketpair"); | 207 | bb_simple_perror_msg_and_die("socketpair"); |
207 | 208 | ||
208 | if (!strchr(host, ':')) | 209 | if (!strchr(host, ':')) |
209 | @@ -709,18 +774,18 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) | 210 | @@ -709,18 +775,18 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) |
210 | fflush_all(); | 211 | fflush_all(); |
211 | pid = xvfork(); | 212 | pid = xvfork(); |
212 | if (pid == 0) { | 213 | if (pid == 0) { |
@@ -231,7 +232,7 @@ index 6a64836fb..ad352586e 100644 | |||
231 | xmove_fd(2, 3); | 232 | xmove_fd(2, 3); |
232 | xopen("/dev/null", O_RDWR); | 233 | xopen("/dev/null", O_RDWR); |
233 | memset(&argv, 0, sizeof(argv)); | 234 | memset(&argv, 0, sizeof(argv)); |
234 | @@ -729,18 +794,18 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) | 235 | @@ -729,18 +795,18 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) |
235 | argv[2] = (char*)"-quiet"; | 236 | argv[2] = (char*)"-quiet"; |
236 | argv[3] = (char*)"-connect"; | 237 | argv[3] = (char*)"-connect"; |
237 | argv[4] = (char*)host; | 238 | argv[4] = (char*)host; |
@@ -256,7 +257,7 @@ index 6a64836fb..ad352586e 100644 | |||
256 | *argp++ = (char*)"-verify"; //[7] | 257 | *argp++ = (char*)"-verify"; //[7] |
257 | *argp++ = (char*)"100"; //[8] | 258 | *argp++ = (char*)"100"; //[8] |
258 | *argp++ = (char*)"-verify_return_error"; //[9] | 259 | *argp++ = (char*)"-verify_return_error"; //[9] |
259 | @@ -762,10 +827,10 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) | 260 | @@ -762,10 +828,10 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) |
260 | # else | 261 | # else |
261 | bb_perror_msg_and_die("can't execute '%s'", argv[0]); | 262 | bb_perror_msg_and_die("can't execute '%s'", argv[0]); |
262 | # endif | 263 | # endif |
@@ -269,7 +270,7 @@ index 6a64836fb..ad352586e 100644 | |||
269 | free(servername); | 270 | free(servername); |
270 | free(allocated); | 271 | free(allocated); |
271 | close(sp[1]); | 272 | close(sp[1]); |
272 | @@ -777,6 +842,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) | 273 | @@ -777,6 +843,7 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) |
273 | # endif | 274 | # endif |
274 | return sp[0]; | 275 | return sp[0]; |
275 | } | 276 | } |
@@ -277,7 +278,7 @@ index 6a64836fb..ad352586e 100644 | |||
277 | #endif | 278 | #endif |
278 | 279 | ||
279 | #if ENABLE_FEATURE_WGET_HTTPS | 280 | #if ENABLE_FEATURE_WGET_HTTPS |
280 | @@ -1151,6 +1217,9 @@ static void download_one_url(const char *url) | 281 | @@ -1151,6 +1218,9 @@ static void download_one_url(const char *url) |
281 | server.user = NULL; | 282 | server.user = NULL; |
282 | target.user = NULL; | 283 | target.user = NULL; |
283 | 284 | ||
@@ -287,7 +288,7 @@ index 6a64836fb..ad352586e 100644 | |||
287 | parse_url(url, &target); | 288 | parse_url(url, &target); |
288 | 289 | ||
289 | /* Use the proxy if necessary */ | 290 | /* Use the proxy if necessary */ |
290 | @@ -1234,22 +1303,41 @@ static void download_one_url(const char *url) | 291 | @@ -1234,22 +1304,41 @@ static void download_one_url(const char *url) |
291 | /* openssl-based helper | 292 | /* openssl-based helper |
292 | * Inconvenient API since we can't give it an open fd | 293 | * Inconvenient API since we can't give it an open fd |
293 | */ | 294 | */ |
@@ -339,7 +340,7 @@ index 6a64836fb..ad352586e 100644 | |||
339 | socket_opened: | 340 | socket_opened: |
340 | #elif ENABLE_FEATURE_WGET_HTTPS | 341 | #elif ENABLE_FEATURE_WGET_HTTPS |
341 | /* Only internal TLS support is configured */ | 342 | /* Only internal TLS support is configured */ |
342 | @@ -1353,7 +1441,41 @@ static void download_one_url(const char *url) | 343 | @@ -1353,7 +1442,41 @@ static void download_one_url(const char *url) |
343 | shutdown(fileno(sfp), SHUT_WR); | 344 | shutdown(fileno(sfp), SHUT_WR); |
344 | } | 345 | } |
345 | #endif | 346 | #endif |
@@ -382,7 +383,7 @@ index 6a64836fb..ad352586e 100644 | |||
382 | /* | 383 | /* |
383 | * Retrieve HTTP response line and check for "200" status code. | 384 | * Retrieve HTTP response line and check for "200" status code. |
384 | */ | 385 | */ |
385 | @@ -1536,6 +1658,10 @@ However, in real world it was observed that some web servers | 386 | @@ -1536,6 +1659,10 @@ However, in real world it was observed that some web servers |
386 | /* ftpcmd("QUIT", NULL, sfp); - why bother? */ | 387 | /* ftpcmd("QUIT", NULL, sfp); - why bother? */ |
387 | } | 388 | } |
388 | #endif | 389 | #endif |
@@ -393,7 +394,7 @@ index 6a64836fb..ad352586e 100644 | |||
393 | fclose(sfp); | 394 | fclose(sfp); |
394 | 395 | ||
395 | free(server.allocated); | 396 | free(server.allocated); |
396 | @@ -1690,9 +1816,18 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 397 | @@ -1690,9 +1817,18 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
397 | xdup2(G.log_fd, STDERR_FILENO); | 398 | xdup2(G.log_fd, STDERR_FILENO); |
398 | } | 399 | } |
399 | } | 400 | } |
@@ -413,7 +414,7 @@ index 6a64836fb..ad352586e 100644 | |||
413 | 414 | ||
414 | if (G.output_fd >= 0) | 415 | if (G.output_fd >= 0) |
415 | xclose(G.output_fd); | 416 | xclose(G.output_fd); |
416 | @@ -1704,6 +1839,6 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 417 | @@ -1704,6 +1840,6 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
417 | free(G.extra_headers); | 418 | free(G.extra_headers); |
418 | #endif | 419 | #endif |
419 | FINI_G(); | 420 | FINI_G(); |