]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Adjust code to deal with new LWP::UserAgent.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 3 Feb 2022 11:16:12 +0000 (12:16 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Wed, 9 Feb 2022 20:08:45 +0000 (20:08 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
config/cfgroot/ids-functions.pl

index 74d55def6c986ca96b3104f24eb8c865978cd071..bf02bcbaa580d5f239b93a44f42bccefe34d0b8f 100644 (file)
@@ -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);