diff --git a/MANIFEST b/MANIFEST index a88847b..6577ede 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,5 +1,4 @@ lib/Mozilla/CA.pm -lib/Mozilla/CA/cacert.pem Makefile.PL MANIFEST This list of files README diff --git a/Makefile.PL b/Makefile.PL index 9faf720..a491813 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -40,3 +40,11 @@ BEGIN { ExtUtils::MakeMaker::WriteMakefile(%arg); }; } + +package MY; +sub MY::libscan { + my $name = shift->SUPER::libscan(@_); + # Remove private certificate bundle + if ($name =~ /cacert.pem\z/) { $name = '' }; + return $name; +} diff --git a/lib/Mozilla/CA.pm b/lib/Mozilla/CA.pm index 3947c90..6c3a506 100644 --- a/lib/Mozilla/CA.pm +++ b/lib/Mozilla/CA.pm @@ -3,16 +3,10 @@ package Mozilla::CA; use strict; our $VERSION = '20160104'; -use Cwd (); use File::Spec (); -use File::Basename qw(dirname); sub SSL_ca_file { - my $file = File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem"); - if (!File::Spec->file_name_is_absolute($file)) { - $file = File::Spec->catfile(Cwd::cwd(), $file); - } - return $file; + return File::Spec->catfile('/etc/pki/tls/certs/ca-bundle.crt'); } 1;