968ab62492
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJWAqCFAAoJEAgwLbaiZwQoavMP/ArDaUfyTTp1aB+N0xynzl/6 0tVel+fAQFvW5D0uNzVU7hbo9Ql5WZHTUf8GGOVrH+X8SkLPsZ3kMvq2FsEZ9Qgu w0qm2Wmm2SSuCTaqFToCL5jekH/lDpnZH6RnvUdh0cFbSTKrRc90CP9r8b23BxkA RYaZezhnRfK4IDlYb6Yr8hzftsogfJ45VlCnbzrzjhm00OEiclYw11bcM2u3IWxn tj/CzSymHHUvfoof5VYejIsEYbvsH/s0vXPLk/8RI7gHS5d1SRpsxo036VVLi8Ln lRwomCZawifyEEAmKBPUbGW0TvGjALbsxHqdSrjPGXHbrT3WOtfWNP6OR1ZN/2wk ZKxi522nz6rEBWgRdeKJFbf3u7C/r9zL7kVG31hj/amkALZnChCC08mnkXkpX/MF xMhg7bK6R34GUQXko8hlF72ZjgYEbMpmLVw8w4pbXgNHMxmO10dCm36g1PWZ0f5N GMji+5kHvPnvgrziF2vafjFgdyCWQUL4rDxn+wQkLGP6LFv8pXzWedwZ5gitGM5Q /OGkHoDiy+Y/tPqVBbVUkm65H6Qo1wx0GcFLl4Zqajc91r5H9E6f/JQEqmfrVB3V PPLC3db/+mbOyG88YSBx/Fk9/7d7DX423OhZnVQocdbT7RAUWqyqk5zRZj7ND5XA UIm8AhuBvAW8MVU7cKYh =51// -----END PGP SIGNATURE----- Merge tag 'libpsl-0.11.0' into debian Release v0.11.0 |
||
---|---|---|
contrib | ||
debian | ||
docs/libpsl | ||
include | ||
list@2930bb4a52 | ||
po | ||
src | ||
tests | ||
tools | ||
.dir-locals.el | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
ABOUT-NLS | ||
AUTHORS | ||
COPYING | ||
LICENSE | ||
Makefile.am | ||
NEWS | ||
README | ||
README.md | ||
autogen.sh | ||
configure.ac | ||
libpsl.pc.in |
README.md
libpsl - C library to handle the Public Suffix List
A "public suffix" is a domain name under which Internet users can directly register own names.
Browsers and other web clients can use it to
- avoid privacy-leaking "supercookies"
- avoid privacy-leaking "super domain" certificates (see post from Jeffry Walton)
- domain highlighting parts of the domain in a user interface
- sorting domain lists by site
Libpsl...
- has built-in PSL data for fast access
- allows to load PSL data from files
- checks if a given domain is a "public suffix"
- provides immediate cookie domain verification
- finds the longest public part of a given domain
- finds the shortest private part of a given domain
- works with international domains (UTF-8 and IDNA2008 Punycode)
- is thread-safe
- handles IDNA2008 UTS#46 (libicu is used by psl2c if installed)
Find more information about the Publix Suffix List here.
Download the Public Suffix List here.
API Documentation
You find the current API documentation here.
Quick API example
#include <stdio.h>
#include <libpsl.h>
int main(int argc, char **argv)
{
const char *domain = "www.example.com";
const char *cookie_domain = ".com";
const psl_ctx_t *psl = psl_builtin();
int is_public, is_acceptable;
is_public = psl_is_public_suffix(psl, domain);
printf("%s %s a public suffix.\n", domain, is_public ? "is" : "is not");
is_acceptable = psl_is_cookie_domain_acceptable(psl, domain, cookie_domain);
printf("cookie domain '%s' %s acceptable for domain '%s'.\n",
cookie_domain, is_acceptable ? "is" : "is not", domain);
return 0;
}
Command Line Tool
Libpsl comes with a tool 'psl' that gives you access to most of the library API via command line.
$ psl --help
prints the usage.
License
Libpsl is made available under the terms of the MIT license.
See the LICENSE file that accompanies this distribution for the full text of the license.
Building from git
Download project and prepare sources with
git clone http://github.com/rockdaboot/libpsl
./autogen.sh
./configure
make
make check
Mailing List
To join the mailing list send an email to
libpsl-bugs+subscribe@googlegroups.com
and follow the instructions provided by the answer mail.
Or click join.