Commit Graph

75 Commits

Author SHA1 Message Date
Darshit Shah 4d5982ed98 Add new function psl_free_string()
When writing a wrapper around LibPSL in a different language it is
important that libpsl provide functions to free any memory that it
allocates. Without this, it is impossible to correctly free the memory
allocated by psl_str_to_utf8lower() function since in other languages
one may not have access to the same free() call from libc.
2017-08-30 11:07:04 +02:00
Tim Rühsen e20e6f369b Add clang's CFI instrumentation
Add --enable-cfi ./configure option to enable
LLVM/Clang's Control Flow Integrity for builds.

CFI aborts a program upon detecting certain forms of undefined behavior
that can potentially allow attackers to subvert the program’s control flow.
2017-06-19 17:14:29 +02:00
Tim Rühsen 31684dc7fd Add psl_latest() and psl_dist_filename() to tests 2017-01-04 17:10:57 +01:00
Zhang Hai 00f628d802 s/Publix/Public/ 2016-12-07 16:14:04 +08:00
Tim Rühsen deabd4a546 Replace psl2c by psl-make-dafsa
Removed --input-format from psl-make-dafsa.
Added --output-format=cxx+ to psl-make-dafsa.
Removed psl2c.
2016-12-06 15:22:18 +01:00
Tim Rühsen 6490b8214b Don't taint out variable on error in psl_str_to_utf8lower()
Fixes #71
2016-12-05 16:28:47 +01:00
Tim Rühsen 2c871b1306 Skip conversion in _psl_is_public_suffix() for builtin psl context 2016-11-06 11:59:36 +01:00
Tim Rühsen 70661c6807 Add checking with ASCII DAFSA in test-is-public-all.c 2016-11-06 11:30:20 +01:00
Tim Rühsen e30e77ef12 Create ASCII and UTF-8 binaries for testing 2016-11-05 11:17:11 +01:00
Tim Rühsen 598a78b2de Add better test code coverage 2016-09-26 15:15:34 +02:00
Tim Rühsen 1baaacccd5 Fix libidn/libidn2 code path of psl_str_to_utf8lower()
* fixing memory leaks
* proper handling of unterminated results of u8_tolower()
* second call to iconv() ensures flush of internal memory
* check more code paths of psl_str_to_utf8lower() via
  tests/test-registrable-domain.c
2016-09-23 12:35:08 +02:00
Tim Rühsen 4798ee88a2 Add test suite support for list/tests/tests.txt 2016-02-20 15:06:48 +01:00
Tim Rühsen 95a5152e56 Update copyright year to 2016 2016-01-02 13:36:49 +01:00
Tim Rühsen 9f420e2d91 Add tests against the built-in PSL to test-is-public-all.c 2016-01-01 23:26:44 +01:00
Tim Rühsen 5c159a3a09 Add few more tests to test-is-public-builtin.c 2016-01-01 22:34:55 +01:00
Tim Rühsen cde5e53ea6 Remove psl_builtin_compile_time() for reproducable builds 2016-01-01 15:44:24 +01:00
Tim Rühsen 9d2e93f0b8 New function psl_is_public_suffix2()
The current PSL has two sections, ICANN and PRIVATE.
This new function allows to limit the check for one or both
of these sections.
2015-12-06 21:55:56 +01:00
Tim Rühsen 519b8c9d17 Add time measurement for test-is-public-all.c 2015-12-03 10:08:04 +01:00
Tim Rühsen f3b479fd45 Remove -DDATADIR from DEFS in tests/Makefile.am 2015-11-19 11:14:31 +01:00
Tim Rühsen 53c2fe31a8 Update copyright years 2015-09-23 14:50:01 +02:00
Tim Rühsen 4c8d3c4d73 Remove unused variable from tests/test-is-public-all.c 2015-09-15 15:16:04 +02:00
Tim Rühsen fa55bb75c4 Removed test with wrong assumptions 2015-09-15 14:46:07 +02:00
Tim Rühsen 0652af910e Fix SIGSEGV in test-is-public-all.c for TLD exceptions 2015-09-15 12:19:18 +02:00
Tim Rühsen 7b72ac673b Skip leading whitespaces in tests_psl.txt 2015-08-14 12:27:11 +02:00
Daniel Kahn Gillmor c1b52ee2d8 Expect more from test_psl.txt
There were some tests included in test_psl.txt that we were not
covering because they didn't match our expectations.

Cover all the tests in test_psl that we know about, and count unknown
lines as failed tests.
2015-08-13 18:02:11 -04:00
Tim Rühsen 71835fcd44 Add https://github.com/publicsuffix as git submodule 2015-07-14 13:25:42 +02:00
Tim Rühsen 067f6aee9c Don't use locale dependent isspace()
Fixes an issue on Solaris
Reported-by: Dagobert Michelsen <dam@opencsw.org>
2015-01-26 11:05:32 +01:00
Tim Rühsen bbed26b303 check for alloca.h before including 2014-10-28 15:41:35 +01:00
Tim Rühsen 8c6179e798 added support for IP addresses in psl_is_cookie_domain_acceptable() 2014-08-19 17:46:36 +02:00
Tim Ruehsen 373bcb912c more work on support for libidn, libidn2, libicu 2014-06-29 22:56:33 +02:00
Tim Rühsen 74f715bd9c started with libidn2 integration 2014-06-27 17:13:30 +02:00
Tim Ruehsen 1c20931896 introduced defines for error codes 2014-06-20 12:36:51 +02:00
Tim Ruehsen 58bdb22546 revoked UTF-8 IDNA comments 2014-06-18 15:36:26 +02:00
Tim Ruehsen 28adbe1f1b removed IDNA case test if libicu is not configured 2014-06-18 15:20:48 +02:00
Tim Ruehsen 9aea73fb64 respect test data being always UTF-8 2014-06-18 12:41:23 +02:00
Tim Ruehsen 29d1300c86 free allocated variable 2014-06-18 12:25:06 +02:00
Tim Ruehsen 57394eb1f8 added psl_str_to_utf8lower() 2014-06-17 17:14:02 +02:00
Tim Ruehsen 657a1d4b88 use libicu for UTF-8 lowercase conversion 2014-06-16 21:59:23 +02:00
Daniel Kahn Gillmor cadb963475 remove LIBPSL_API_VERSION for simplicity 2014-05-31 18:56:07 +02:00
Tim Ruehsen 61753f43ab added special test cases '.', empty string, NULL, unknown TLD 2014-05-12 14:15:40 +02:00
Tim Ruehsen 1efb6b75f4 changed code to C89 standard 2014-05-12 12:20:59 +02:00
Tim Ruehsen ed9562848c small --disable-builtin cleanups 2014-04-17 13:09:29 +02:00
Tim Ruehsen d04e6f5c09 new test test-is-cookie-domain-acceptable.c 2014-04-16 10:55:57 +02:00
Tim Ruehsen 5fa3b170bd added checks in test-registrable-domain.c 2014-04-16 10:53:59 +02:00
Tim Ruehsen b8f7a79947 added checks for special .name domain 2014-04-15 15:02:50 +02:00
Tim Ruehsen c481e8019d added ./configure --with-psl-testfile to set PSL test file path 2014-04-13 16:43:03 +02:00
Tim Ruehsen c93268ce25 added ./configure --with-psl-file to set PSL file path 2014-04-13 16:35:28 +02:00
Tim Ruehsen b49e681d8f renamed psl_is_public() to psl_is_public_suffix() 2014-04-12 16:04:42 +02:00
Tim Ruehsen c37830f6fc reverted meaning of psl_is_public (again), started function docs 2014-04-06 22:30:50 +02:00
Tim Ruehsen 65a1f03939 small code fixes 2014-03-30 21:52:00 +02:00