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);
# Handle rules files.
} elsif ($file =~ m/\.rules$/) {
+ # Skip rule files which are not located in the rules directory or archive root.
+ next unless(($packed_file =~ /^rules\//) || ($packed_file !~ /\//));
+
+ # Skip deleted.rules.
+ #
+ # Mostly they have been taken out for correctness or performance reasons and therfore
+ # it is not a great idea to enable any of them.
+ next if($file =~ m/deleted.rules$/);
+
my $rulesfilename;
# Splitt the filename into chunks.