3278 Commits

Author SHA1 Message Date
657e3d22c4 Release v2.1.0 v2.1.0 2023-08-31 14:46:39 +02:00
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
fa2f03cbe5 * libwget/dns.c (resolve): Restrict socket type to SOCK_STREAM on Windows 2023-08-31 12:40:57 +02:00
3fb56d60ff Fix parsing HTMP/XML entities in URLs from HTML/XML
* libwget/xml.c (wget_xml_decode_entities_inline): Fix decoding of &#dddd; and &#xhhhh;.
* tests/test-base.c (main): Add test case for &#dddd; and &#xhhhh;.

Reported-by: Michael Roosz
2023-08-27 20:38:17 +02:00
bb20093f02 dns: Return all kinds of socket types available
The resolve() function only returned SOCK_STREAM (TCP) sockets. We lift
that limitation here, such that it will now return all socket types
available in the system, both SOCK_STREAM and SOCK_DGRAM. And we let the
calling function choose the socket type they want. We make this change
to adapt for the upcoming QUIC code, which works entirely over UDP.

 * libwget/dns.c (resolve): Remove SOCK_STREAM constraint, return all
   kinds of sock types available.
 * libwget/net.c (wget_tcp_connect): select SOCK_STREAM socket types
   only
   (tcp_connect): new function to establish TCP connections.
2023-08-23 11:00:17 +02:00
33a6454aa7 gcc specific C constructor/destructors support for MSVC
* libwget/private.h: Define INITIALIZER to support constructors with MSVC.
* libwget/dns.c: Use INITIALIZER for library constructor.
* libwget/http.c: Likewise.
* libwget/init.c: Likewise.
* libwget/random.c: Likewise.
* libwget/ssl_gnutls.c: Likewise.
* libwget/ssl_openssl.c: Likewise.
* libwget/ssl_wolfssl.c: Likewise.

Co-authored-by: Tim Rühsen <tim.ruehsen@gmx.e
2023-08-18 20:40:02 +02:00
dc13592997 * AUTHORS: Set Mitch Capper to ASSGN [skip ci] 2023-08-18 16:23:00 +02:00
3595963416 Add better default cert/bundle paths for Windows
* include/wget/wget.h: New function wget_ssl_default_cert_dir,
  new function wget_ssl_default_ca_bundle_path.
* libwget/Makefile.am: Add ssl.c.
* libwget/ssl.c: New file for common ssl/tls code.
* libwget/ssl_gnutls.c (tls_init): Initialize cert paths.
* libwget/ssl_openssl.c (tls_init): Likewise.
* libwget/ssl_wolfssl.c (tls_init): Likewise.
* src/options.c (struct config): Init ca_cert,
  (init): Allocate / dup config.ca_cert.

Co-authored-by: Tim Rühsen <tim.ruehsen@gmx.d
2023-08-18 12:40:27 +02:00
f67ca61ab1 * src/options.c (print_version): Work around MSVC preprocessor issue 2023-08-18 10:44:34 +02:00
d735738d73 Don't enable debug logging with wolfssl unless defined prior to including the options file
* libwget/ssl_wolfssl.c: Test for DEBUG_WOLFSSL
2023-08-15 22:43:21 +02:00
f0ef9f4c01 * .gitlab-ci.yml: New stages 2023-08-05 23:22:55 +02:00
14d0460597 * libwget/io.c (wget_update_file): Fix file name generation for Windows 2023-08-05 23:12:47 +02:00
fe842f6ee9 * docs/wget2.md: Wrap short options with backtick
Copyright-paperwork-exempt: Yes
2023-08-05 13:31:55 +02:00
f827dbaaae * docs/wget2.md: Wrap long options with backtick
Copyright-paperwork-exempt: Yes
2023-08-05 13:31:51 +02:00
f4bf9a2037 * libwget/io.c (wget_update_file): Fix MinGW compilation 2023-08-04 11:37:51 +02:00
3f38a87c69 * cfg.mk: Disable several new syntax checks 2023-08-03 19:16:10 +02:00
ec3b71a06f * bootstrap.conf: Call clone_wiki() early to init the wiki submodule 2023-08-03 19:03:49 +02:00
1ccc8d1bf5 * gnulib: Update (Fixes -Wundef) 2023-08-03 19:02:57 +02:00
98844bcf7e * bootstrap: Update 2023-08-03 17:54:26 +02:00
f164acf3cf * gnulib: Update 2023-08-03 17:34:40 +02:00
d24e863381 * libwget/ssl_gnutls.c (wget_ssl_init): Check for heap allocation failure 2023-08-03 14:56:26 +02:00
66fe329eaa * libwget/http.c (wget_http_send_request): Remove unused variables 2023-08-03 14:48:35 +02:00
d0059f71b3 * src/wget.c: Silence -Wvla in gnulib regex.h 2023-08-03 14:44:35 +02:00
c20affea04 * libwget/http.c: Replace VLA in http2 code 2023-08-03 13:57:27 +02:00
54d0ee8e26 * configure.ac: Enable VLA warnings 2023-07-31 18:19:18 +02:00
dad7aaa868 * tests/test-timestamping.c: Replace VLA 2023-07-31 18:19:18 +02:00
1ba0dfc383 * tests/test-include-and-exclude-directories.c: Replace VLA 2023-07-31 18:19:18 +02:00
471ba2bd2e * tests/test-metalink.c: Replace VLA 2023-07-31 18:19:18 +02:00
5270a2b3a8 * libwget/http.c: Replace VLA 2023-07-31 18:19:18 +02:00
216c8b547c * libwget/hpkp_db.c: Replace VLA 2023-07-31 18:19:18 +02:00
1cf863e13b * libwget/hashfile.c: Replace VLA 2023-07-31 18:19:18 +02:00
a0079f0ec6 * libwget/hash_printf.c: Replace VLA 2023-07-31 18:19:18 +02:00
9012368e44 * libwget/bar.c: Replace VLA 2023-07-31 18:19:18 +02:00
b471148519 * libwget/io.c: Replace VLA 2023-07-31 18:19:18 +02:00
7bb0f00f10 * libwget/iri.c: Replace VLA 2023-07-31 18:19:18 +02:00
00bdb562d1 * libwget/ocsp.c: Replace VLA 2023-07-31 18:19:18 +02:00
9a6ef69962 * libwget/tls_session.c: Replace VLA 2023-07-31 18:19:18 +02:00
f1074e04a3 * libwget/xml.c: Replace VLA 2023-07-31 18:19:18 +02:00
4ba92a732d * libwget/ssl_gnutls.c: Replace VLA 2023-07-31 18:19:18 +02:00
7b31ac3a50 * unit-tests/test-parse-html.c: Replace VLA 2023-07-29 19:01:52 +02:00
0b241b4a97 * src/wget.c: Replace VLA 2023-07-29 19:01:49 +02:00
bee185be5b * unit-tests/test-dl.c: Replace VLA 2023-07-29 19:01:43 +02:00
c876010332 * unit-tests/test-decompress.c: Replace VLA 2023-07-29 19:01:38 +02:00
25813e3b6a * unit-tests/test.c: Replace VLA 2023-07-29 19:01:35 +02:00
9f30b1a9c5 * fuzz/main.c: Replace VLA 2023-07-29 19:01:29 +02:00
0667570405 * src/utils.c: Replace VLA 2023-07-29 19:01:24 +02:00
b33a61a67e * tests/libtest.c: Replace VLA 2023-07-29 19:01:21 +02:00
3dc30f5f0c * src/blacklist.c (get_local_filename_real): Replace VLA 2023-07-29 19:01:17 +02:00
db1dc26cab Silence -Wvla when including gettext.h
* libwget/private.h: Disable -Wvla for #include <gettext.h>.
* src/wget_main.h: Likewise.
2023-07-29 19:01:12 +02:00
3bf44e3c00 Enable native VT support on windows (fixes cmdhost etc usages)
* libwget/console.c: New function SetupConsoleHandle(),
  (wget_console_init): Call SetupConsoleHandle().
* src/wget.c: New function is_tty(),
  (main): Call is_tty() instead of isatty().

disable progress bar if VT mode is not supported (unless force is used)
2023-07-29 17:20:09 +02:00