Commit Graph

509 Commits

Author SHA1 Message Date
Dagobert Michelsen db2da103c1 Use LIBIDN2_LIBS instead of hardcoding 2018-04-27 15:52:26 +02:00
Tim Rühsen 26dd00fcec Release V0.20.2 2018-04-27 15:52:25 +02:00
Tim Rühsen 1c9ec0f26f Add msvc/ autogen files to .gitignore 2018-04-27 15:52:24 +02:00
Tim Rühsen 28deb48239 Fix several configure --enable options 2018-04-27 15:52:23 +02:00
Tim Rühsen 14cec19b16 Remove _HIDDEN from src/lookup_string_in_fixed_set.c 2018-04-27 15:52:22 +02:00
Chun-wei Fan 5abae86452 Add NMake Makefiles for Visual Studio builds
This adds a set of Visual Studio NMake Makefiles that can be used to
build libpsl, either as a DLL or as a static .lib.  Building of the psl
tool and the tests in tests/ (but not fuzz, since those tests use
fmemopen(), that is not supported on Windows) are also supported.

A simplified "install" target is provided that copies the build
results to a default or set prefix with the pkg-config file so that
other packages (such as libsoup) with build systems that depend on this
.pc file can be built.

These files make use of autotools stuff so that they have the up-to-date
version info upon a release.

Currently, only builds using the ICU runtime/builtin or with no
runtime/builtin are supported with Visual Studio builds.
2018-04-27 15:52:21 +02:00
Tim Rühsen d59f6a7c8c Fix make distcheck 2018-04-27 15:52:20 +02:00
Tim Rühsen 3f48ced2ac Fix when built as a projects subdir 2018-04-27 15:52:19 +02:00
Tim Rühsen 70aa3812cb Add LTLIBICONV and LTLIBINTL to libpsl build 2018-04-27 15:52:17 +02:00
Tim Rühsen 184da24502 Add support for native Win32 builds 2018-04-27 15:52:16 +02:00
Tim Rühsen e8c80a8470 Fix MinGW cros build on Linux 2018-04-27 15:52:15 +02:00
Tim Rühsen 517df86b99 Fix previous commit 2018-04-27 15:52:15 +02:00
Tim Rühsen 2d520d84fe Fallbacks for IDN library detection
When not explictly given --enable-runtime/--enable-builtin,
./configure tries to first detect libidn2, then libicu, then
libidn. If none found, it fals back to --disable-runtime and
--disable-builtin.

Reported-by: Chun-wei Fan
2018-04-27 15:52:14 +02:00
Chun-wei Fan 28180937ca src/psl.c: Fix build on Visual Studio
Visual Studio does not come with unistd.h, so only include it when we
have HAVE_UNISTD_H.  It also does not like including locale.h within
main() for some reason, so include that with the other system headers.
2018-04-27 15:52:13 +02:00
Chun-wei Fan de8b1d2871 fuzz: Skip the tests if fmemopen() is not found
fmemopen() is a function that is only provided with *NIX systems, so we
ought to check for its presence in order to build and run the tests
in fuzz/ fully, otherwise, we just skip the tests.

Also include headers according to how they are found, and add fallbacks
for Visual Studio that do not have stdint.h yet.
2018-04-27 15:52:12 +02:00
Tim Rühsen 3f511532de Make global vars static in test-is-public-all.c 2018-04-27 15:52:11 +02:00
Tim Rühsen dd44296e62 Remove leading _ from header guard 2018-04-27 15:52:11 +02:00
Tim Rühsen eba4c9f9a2 Remove unused vars in test-is-public-all.c 2018-04-27 15:52:10 +02:00
Tim Rühsen 5d27e573b8 Extend visibility support
Also renamed PSL_PUBLIC -> PSL_API (conforming to other known libraries).
2018-04-27 15:52:09 +02:00
Chun-wei Fan 11e2a32b4a libpsl.h.in: Decorate public symbols for export
Introduce a macro, PSL_PUBLIC, which is defined as nothing by default,
which can be used by the compiler to instruct the linker to export the
public symbols, such as __declspec (dllexport) on Visual Studio.
2018-04-27 15:52:08 +02:00
Chun-wei Fan 8767c48f43 src/psl.c: Make code compilable on native Windows
Include the Windows/Winsock2 counterparts of the networking headers on
Windows and avoid including *NIX-specific headers on Windows.

Also remove the small bits of C99isms from the code.
2018-04-27 15:52:07 +02:00
Emmanuele Bassi bbee21ff68 Fix non-srcdir builds
We need to modify the various paths we reference to include the build
directory, in the case when the build directory is not the source
directory.
2018-04-27 15:52:07 +02:00
Daniel Kahn Gillmor 8207e13cdc fix spelling errors 2018-04-27 15:52:06 +02:00
Tim Rühsen b9db5a7305 Fix make distcheck without enabled docs 2018-04-27 15:52:05 +02:00
Tim Rühsen 6aaf6f4620 Don't require xsltproc when not building man pages 2018-04-27 15:52:04 +02:00
Tim Rühsen 4e808b0496 Fix --disable-builtin configure option 2018-04-27 15:52:03 +02:00
Tim Rühsen bb53ff2d63 Release V0.20.1 2018-04-27 15:52:02 +02:00
Tim Rühsen adcf96fbbe Improve docs for PSL_TYPE_NO_STAR_RULE 2018-04-27 15:52:01 +02:00
Tim Rühsen 0410c72cd9 Add man page text about effect of --no-star-rule 2018-04-27 15:52:01 +02:00
Tim Rühsen 3b63c58722 Add --no-star-rule to psl utility 2018-04-27 15:52:00 +02:00
Tim Rühsen a19acd4299 Release v0.20.1 2018-04-27 15:51:59 +02:00
Tim Rühsen e901f5321f Fix PSL_TYPE_NO_STAR_RULE and improve test suite
Reported-by: Daniel Kahn Gillmor
2018-04-27 15:51:58 +02:00
Tim Rühsen dec2485114 Release v0.20.0 2018-04-27 15:51:57 +02:00
Tim Rühsen 3c28595151 Update copyrights 2018-04-27 15:51:57 +02:00
Tim Rühsen b42ca62b9c Update fuzzer to use PSL_TYPE_NO_STAR_RULE 2018-04-27 15:51:56 +02:00
Tim Rühsen 83fc0431e4 Update PSL submodule 2018-04-27 15:51:55 +02:00
Tim Rühsen c0cd25178b Add TLDs to (DAFSA) data to allow skipping the star rule 2018-04-27 15:51:54 +02:00
Claudio Saavedra db6f7b971c Add tests for PSL_TYPE_NO_STAR_RULE 2018-04-27 15:51:53 +02:00
Claudio Saavedra 737246856e psl_is_public_suffix2(): allow checking for suffixes not in the list
Add a PSL_TYPE_NO_STAR_RULE type to check for suffixes without the '*'
rule. This allows checking for suffixes that are not in the PSL.
2018-04-27 15:51:52 +02:00
Tim Rühsen 58ff15ca2c Remove C99 loop construct 2018-04-27 15:51:52 +02:00
Tim Rühsen 5c9e7e74ee Limit CPU wasting on large inputs
Large inputs on psl_registrable_domain() and psl_unregistrable_domain()
suffer from a O(N^2) behavior. This change limits N to avoid excessive
CPU usage.

At the same time we limit the fuzz corpora size to 64k which is far more
then we expect any real life domain to be.

Reported-by: OSS-Fuzz
2018-04-27 15:51:51 +02:00
Dagobert Michelsen 1f5db700ec Remove unconditional setting of GCC-specific flag 2018-04-27 15:51:50 +02:00
Tim Rühsen 5995c12be6 Update PSL submodule 2018-04-27 15:51:49 +02:00
Jeffrey Walton af2dbb83ec Expand defintion of PSL; add ICANN reference 2018-04-27 15:51:48 +02:00
Tim Rühsen 01a878ac88 Add missing include alloca.h in fuzz/main.c 2018-04-27 15:51:48 +02:00
Tim Rühsen fb29a889e4 Fix printf warnings in fuzz/main.c 2018-04-27 15:51:47 +02:00
Tim Rühsen 4fede219a1 Release v0.19.1 2018-04-27 15:51:46 +02:00
Tim Rühsen 8530d396c1 Fix unsigned integer overflow in _mem_is_ascii()
Found by OSS-Fuzz. It has no impact.
2018-04-27 15:51:45 +02:00
Tim Rühsen fa59acdeb8 Update corpora from oss-fuzz 2018-04-27 15:51:44 +02:00
Tim Rühsen a48169e6da psl_*_count() return -1 if information is not available 2018-04-27 15:51:43 +02:00