From 954dbdadcf0915c3f0f31bee818b99d3d1843ae9 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Thu, 3 Feb 2022 12:16:12 +0100 Subject: [PATCH] ids-functions.pl: 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 --- 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 74d55def6c..bf02bcbaa5 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); -- 2.39.2