From patchwork Thu Feb 3 11:16:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 5044 Return-Path: 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 4JqGMX4r76z3wp0 for ; Thu, 3 Feb 2022 11:16:40 +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 4JqGMJ1w0Bz2KY; Thu, 3 Feb 2022 11:16:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4JqGMJ26pvz30JB; Thu, 3 Feb 2022 11:16:28 +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 4JqGMH0516z2xFK for ; 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 4JqGMD26Mbz4nW; Thu, 3 Feb 2022 11:16:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1643886984; 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=C3OTNbSPLxmlCphwXjYJHIrGXyGfukqxq7XP+okFJtk=; b=qFIVoc4XdUxljB1ljsWyMkBJRABf4oPGBD5S0c3Kdwquo8k/7PdMiXRcu1KdR/GM0rju5E wTyse8JwfVGjwMDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1643886984; 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=C3OTNbSPLxmlCphwXjYJHIrGXyGfukqxq7XP+okFJtk=; b=deurUON4RkY2Zhx2n3H/ksrlTO9msm8dTeCunM/ggsCqrkg5Qe7/b/82Pm82/bYhJYmqb8 yANbpv8NhSkcH0iSx6T9a+fsaeFOTtaWlGoSF4RebCgZ6OhvUPO/203LJ/A+60YHLpo5JA p7Sbj/+g442MjD/Sq6itSQvMlAj3LdUKOjn/dJQkC7G9fkGTrx5JClzzKRhcz/uFU57xwX Mb2ivPE5quwWhOY+0ys3DnzACSpLhBYd9EHDA62iUHiOdw+4weV7EPXKH8Dnfq1LffBaSg xXWGas0jVU8KgsxkKxI1KAzgZd/zODAXdom6xYZivAGyDWZu2nBOjUL3z9WLNw== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 7/8] ids-functions.pl: Adjust code to deal with new LWP::UserAgent. Date: Thu, 3 Feb 2022 12:16:12 +0100 Message-Id: <20220203111613.13632-7-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 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Stefan Schantl Reviewed-by: Peter Müller Reviewed-by: Adolf Belka --- config/cfgroot/ids-functions.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 74d55def6..bf02bcbaa 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -281,7 +281,15 @@ sub downloadruleset ($) { use LWP::UserAgent; # Init the download module. - my $downloader = LWP::UserAgent->new; + # + # Request SSL hostname verification and specify path + # to the CA file. + my $downloader = LWP::UserAgent->new( + ssl_opts => { + SSL_ca_file => '/etc/ssl/cert.pem', + verify_hostname => 1, + } + ); # Set timeout to 10 seconds. $downloader->timeout(10);