From: Stefan Schantl Date: Thu, 3 Feb 2022 11:16:12 +0000 (+0100) Subject: ids-functions.pl: Adjust code to deal with new LWP::UserAgent. X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=954dbdadcf0915c3f0f31bee818b99d3d1843ae9 ids-functions.pl: Adjust code to deal with new LWP::UserAgent. Signed-off-by: Stefan Schantl Reviewed-by: Peter Müller --- 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);