From mboxrd@z Thu Jan  1 00:00:00 1970
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH 8/8] pakfire: Adjust code to deal with new LWP::UserAgent.
Date: Mon, 14 Feb 2022 22:15:54 +0100
Message-ID: <59677cf2-8ec2-abc0-e3b5-91e4f1c5888e@ipfire.org>
In-Reply-To: <20220203111613.13632-8-stefan.schantl@ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0483893417204125792=="
List-Id: <development.lists.ipfire.org>

--===============0483893417204125792==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

Reviewed-by: Adolf Belka <adolf.belka(a)ipfire.org>

On 03/02/2022 12:16, Stefan Schantl wrote:
> Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
> ---
>   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);
>   		

--===============0483893417204125792==--