* libwget/ssl_openssl.c (wget_ssl_open): Correctly return WGET_E_CERTIFICATE.
* libwget/ssl_wolfssl.c (wget_ssl_init): Support OCSP w/o stapling.
* src/options.c (init): Set WGET_SSL_OCSP_DATE and WGET_SSL_OCSP_NONCE for WolfSSL.
* tests/test-ocsp-server.c: Enable more tests for WolfSSL.
* libwget/decompressor.c (wget_decompress): Return error code.
* libwget/http.c: Return error from wget_decompress().
* libwget/http2.c: Likewise.
* tests/Makefile.am: New test test-broken-gzip.
* tests/test-broken-gzip.c: New test file.
* src/bar.c: Main implementation of dotted progress bar.
* src/options.c: Handle different types for the dotted progress bar.
* src/wget.c: Adjust calling the progress bar.
* src/wget_bar.h: Define PROGRESS_TYPE_DOT.
* src/wget_options.h: Extend struct config.
* tests/test-wget-1.c: Simple testing if wget2 accepts the dot types.
* README.md: Add description on how to build static wget2 for Linux/amd64.
* contrib/Dockerfile.musl.static.amd64: New Dockerfile.
* contrib/Dockerfile.win32.static: Fix docker warning.
* src/wget.c (process_response_header): Delegate link handling to process_response().
* tests/Makefile.am: Add test-link-location.c.
* tests/test-link-location.c: New test file.
* src/wget.c (convert_links): process URL the same way as in normalize_uri().
* tests/Makefile.am: Add new test file test-k-percent-encoding.c.
* tests/test-k-percent-encoding.c: New file.
In src/blacklist.c:get_local_filename_real(), the stack/heap selection for
fname_esc was inverted, so the code used `char tmp[1024]` exactly when the
required size is >1024, leading to stack corruption when
wget_restrict_file_name() writes into it.
This was introduced by commit 3dc30f5f0c.
Reported-by: Arkadi <arkadva8@gmail.com>
* Makefile.am: Run tests of GnuTLS is available.
* configure.ac: Add conditional WITH_GNUTLS_IN_TESTSUITE,
add check for SSLv2_client_method().
* libwget/ssl_wolfssl.c (wget_ssl_init): Silently fall back to
SSLv3 if SSLv2 is requested but not available.
This adds extensive HTTP/2 test coverage using libnghttp2 as the test
server, covering multiplexing, stream error handling, connection
management, and settings negotiation.
* tests/libtest.h (wget_test_url_t): Add h2_delay_response and
h2_rst_stream_error fields for HTTP/2 test control.
(WGET_TEST_H2_MIN_CONCURRENT_STREAMS): New test flag.
(wget_test_get_h2_server_port): Declare function.
* tests/libtest.c: Remove HAVE_MICROHTTPD_HTTP2_H infrastructure,
(h2_session_data, h2_server_t): New structures for libnghttp2 server,
(h2_send_callback, h2_recv_callback): Implement nghttp2 I/O callbacks,
(h2_on_frame_recv_callback): Handle HTTP/2 frames,
(h2_on_header_callback): Process request headers,
(h2_data_read_callback): Stream response body with 8KB chunk limit,
(h2_on_stream_close_callback): Clean up stream resources,
(h2_session_data_new, h2_session_data_free): Manage session lifecycle,
(h2_server_thread): Main server loop with TLS and ALPN support,
(h2_server_start, h2_server_stop): Control server lifecycle,
(_http_server_stop): Remove gnutls_global_deinit() call to fix
server restart issues,
(wget_test_start_server_handler): Default start_h2 to 0 (opt-in),
enable HTTP/2 with WGET_TEST_H2_ONLY flag,
(wget_test): Skip H2_PASS when libnghttp2 unavailable,
(wget_test_get_h2_server_port): Return HTTP/2 server port.
* tests/Makefile.am (WGET_TESTS): Add test-http2-multiplexing,
test-http2-stream-errors, test-http2-connection-errors,
test-http2-settings.
* tests/test-http2-multiplexing.c: New file testing concurrent
downloads over single HTTP/2 connection with multiplexing.
* tests/test-http2-stream-errors.c: New file testing stream error
isolation with RST_STREAM frames.
* tests/test-http2-connection-errors.c: New file testing connection
recovery after server restart.
* tests/test-http2-settings.c: New file testing SETTINGS frame
exchange, header compression, and large headers.
* tests/test-limit-rate-http2.c (main): Skip 3-file multiplexed
download test when running with HTTP/2 due to rate limiting
limitations in test server.
The HTTP/2 test server uses libnghttp2 with GnuTLS for TLS and ALPN
negotiation. Tests verify protocol-specific features like multiplexing,
stream independence, and proper SETTINGS exchange. HTTP/2 is now opt-in
via WGET_TEST_H2_ONLY to avoid breaking existing tests.
* libwget/ssl_gnutls.c (ssl_writev): Only check errno on error.
* src/job.c (job_validate_file): Set errno explicitly to 0.
* src/utils.c (mkdir_path): Check a secure value of errno.
* src/wget.c (prepare_file): Likewise.
* libwget/base64.c (base64_encode): Drop explicit error length.
* libwget/buffer_printf.c (convert_pointer): Likewise.
Just cosmetics - allows to build with -Werror.