summaryrefslogtreecommitdiff
path: root/lib/version.c
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2015-09-29 11:33:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-10-17 16:37:49 +0200
commite77b5b7453c1e8ccd7ec0816890d98e2f392e465 (patch)
treeae7b513cc29249c745755a353ecc240dee912f0f /lib/version.c
parent684816cd9b846a955947ef57e269b12e5224f408 (diff)
downloadcurl-e77b5b7453c1e8ccd7ec0816890d98e2f392e465.tar.gz
cookies: Add support for Mozilla's Publix Suffix List
Use libpsl to check the domain value of Set-Cookie headers (and cookie jar entries) for not being a Publix Suffix. The configure script checks for "libpsl" by default. Disable the check with --without-libpsl. Ref: https://publicsuffix.org/ Ref: https://github.com/publicsuffix/list Ref: https://github.com/rockdaboot/libpsl
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/version.c b/lib/version.c
index 1727c5a7d..8784c2b01 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -40,6 +40,10 @@
#include <stringprep.h>
#endif
+#ifdef USE_LIBPSL
+#include <libpsl.h>
+#endif
+
#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
#include <iconv.h>
#endif
@@ -100,6 +104,11 @@ char *curl_version(void)
ptr += len;
}
#endif
+#ifdef USE_LIBPSL
+ len = snprintf(ptr, left, " libpsl/%s", psl_get_version());
+ left -= len;
+ ptr += len;
+#endif
#ifdef USE_WIN32_IDN
len = snprintf(ptr, left, " WinIDN");
left -= len;