From 53f7dc7620bfb51e8b1daa8c727206425e06d87a Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Thu, 3 Feb 2022 12:16:13 +0100 Subject: [PATCH] pakfire: Adjust code to deal with new LWP::UserAgent. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Schantl Reviewed-by: Peter Müller --- src/pakfire/lib/functions.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 87ce735409..8d0923d650 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -155,7 +155,14 @@ sub fetchfile { logger("DOWNLOAD INFO: Host: $host ($proto) - File: $file"); - my $ua = LWP::UserAgent->new; + # Init LWP::UserAgent, request SSL hostname verification + # and specify CA file. + my $ua = LWP::UserAgent->new( + ssl_opts => { + SSL_ca_file => '/etc/ssl/cert.pem', + verify_hostname => 1, + } + ); $ua->agent("Pakfire/$Conf::version"); $ua->timeout(20); -- 2.39.2