From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH 8/8] pakfire: Adjust code to deal with new LWP::UserAgent. Date: Sat, 05 Feb 2022 12:26:37 +0000 Message-ID: <6bc23710-7bd3-8a07-919c-5985f2df24f1@ipfire.org> In-Reply-To: <20220203111613.13632-8-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7640940380182069053==" List-Id: --===============7640940380182069053== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Same here. Let's hope we never overlook this is necessary... Reviewed-by: Peter Müller > Signed-off-by: Stefan Schantl > --- > 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 2f34763d5..37b930080 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); > --===============7640940380182069053==--