From e37417e0213c4a5a226c20859720b8aba8dac03f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 9 Jun 2026 14:02:32 +0200 Subject: [PATCH] psl: require libpsl 0.16.0 (2016-12-10) or greater Debian Stretch offers 0.17.0. Ref: https://github.com/rockdaboot/libpsl/releases/tag/libpsl-0.16.0 Ref: https://sources.debian.org/src/libpsl/ Closes #21933 --- docs/INTERNALS.md | 1 + lib/psl.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md index 77f2e43735..ee32a2dbfd 100644 --- a/docs/INTERNALS.md +++ b/docs/INTERNALS.md @@ -31,6 +31,7 @@ We aim to support these or later versions. - GnuTLS 3.6.5 (2018-12-01) - libidn2 2.0.0 (2017-03-29) - libgsasl 1.6.0 (2010-12-14) +- libpsl 0.16.0 (2016-12-10) - LibreSSL 2.9.1 (2019-04-22) - libssh 0.9.0 (2019-06-28) - libssh2 1.9.0 (2019-06-20) diff --git a/lib/psl.c b/lib/psl.c index e2488aea22..b9ce47d0a7 100644 --- a/lib/psl.c +++ b/lib/psl.c @@ -29,6 +29,10 @@ #include "progress.h" #include "curl_share.h" +#if !defined(PSL_VERSION_NUMBER) || PSL_VERSION_NUMBER < 0x001000 +#error "libpsl 0.16.0 or greater required" +#endif + void Curl_psl_destroy(struct PslCache *pslcache) { if(pslcache->psl) { @@ -65,7 +69,6 @@ const psl_ctx_t *Curl_psl_use(struct Curl_easy *easy) bool dynamic = FALSE; time_t expires = TIME_T_MAX; -#if defined(PSL_VERSION_NUMBER) && PSL_VERSION_NUMBER >= 0x001000 psl = psl_latest(NULL); dynamic = psl != NULL; /* Take care of possible time computation overflow. */ @@ -74,8 +77,6 @@ const psl_ctx_t *Curl_psl_use(struct Curl_easy *easy) /* Only get the built-in PSL if we do not already have the "latest". */ if(!psl && !pslcache->dynamic) -#endif - psl = psl_builtin(); if(psl) {