Message ID | 20220203111613.13632-8-stefan.schantl@ipfire.org |
---|---|
State | Accepted |
Commit | 53f7dc7620bfb51e8b1daa8c727206425e06d87a |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4JqGMZ5n7Pz3wp0 for <patchwork@web04.haj.ipfire.org>; Thu, 3 Feb 2022 11:16:42 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4JqGMK2N3Nz1gD; Thu, 3 Feb 2022 11:16:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4JqGMK2bB6z30JB; Thu, 3 Feb 2022 11:16:29 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4JqGMH6blSz2xyg for <development@lists.ipfire.org>; Thu, 3 Feb 2022 11:16:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4JqGMF2lzZz5Gg; Thu, 3 Feb 2022 11:16:25 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1643886985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lfBwICiA5+Uq2cs/3aTYW5Ud0CUpRBC8wZNxsvND6ao=; b=a3mkGc4RVPgybCg1Ynr9yRHAYQjoBHXzthjWjjoxbyVmkUJPG/7XsrFcL7aGKtvDBV2NVe P7TniR62s32x9aCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1643886985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lfBwICiA5+Uq2cs/3aTYW5Ud0CUpRBC8wZNxsvND6ao=; b=mHHLL/nGvXDwfqpwJABDbo3NU2QjSdwFX0ua7TfkWVCf3Y7bHuQOg+YqY3JCNCwNV/TIhu C4T55YahzoQCBLbGSyOEzJ6mvV+lJ8bE3KrBfgr7hPqZ1+GZf254AU9ea9SGT98ViFp0pa /dyOCodG+eAKbjF4cXjbBlarPqIJ6i/5fXVCu2QqD22l1Y30aQinJkB/XlaAOkdNCxdziN CVFJLzRJ6c0W8T6qKvzGShcb027VIuaiJfvFGtvUE2nN1wHkGj1XdJvNkq9vjaFegbhy4X XbplWRqjelnTpg/T9XyXO5c0cg/jRU3M/gHTH6/dYaPvKu78ztAdEWmkuqhL7g== From: Stefan Schantl <stefan.schantl@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH 8/8] pakfire: Adjust code to deal with new LWP::UserAgent. Date: Thu, 3 Feb 2022 12:16:13 +0100 Message-Id: <20220203111613.13632-8-stefan.schantl@ipfire.org> In-Reply-To: <20220203111613.13632-1-stefan.schantl@ipfire.org> References: <20220203111613.13632-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[1/8] perl-Try-Tiny: New package.
|
|
Commit Message
Stefan Schantl
Feb. 3, 2022, 11:16 a.m. UTC
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
src/pakfire/lib/functions.pl | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Comments
Same here. Let's hope we never overlook this is necessary... Reviewed-by: Peter Müller <peter.mueller@ipfire.org> > Signed-off-by: Stefan Schantl <stefan.schantl@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); >
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org> On 03/02/2022 12:16, Stefan Schantl wrote: > Signed-off-by: Stefan Schantl <stefan.schantl@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); >
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);