a308f6
From 04cbb3144a8ffe1f70149f4b51c1668b0ddc5dc0 Mon Sep 17 00:00:00 2001
a308f6
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
a308f6
Date: Fri, 16 Sep 2011 10:33:54 +0200
a308f6
Subject: [PATCH] Redirect to ca-certificates bundle
a308f6
MIME-Version: 1.0
a308f6
Content-Type: text/plain; charset=UTF-8
a308f6
Content-Transfer-Encoding: 8bit
a308f6
a308f6
This patch replaces Mozilla-CA certificate bundle with bundle
a308f6
delivered by ca-certificates RPM package used as single source of
a308f6
Mozilla certificate bundle.
a308f6
a308f6
See <https://bugzilla.redhat.com/show_bug.cgi?id=738383> for more
a308f6
details.
a308f6
a308f6
Signed-off-by: Petr Písař <ppisar@redhat.com>
a308f6
---
a308f6
 MANIFEST          | 1 -
a308f6
 Makefile.PL       | 8 ++++++++
a308f6
 lib/Mozilla/CA.pm | 8 +-------
a308f6
 3 files changed, 9 insertions(+), 8 deletions(-)
a308f6
a308f6
diff --git a/MANIFEST b/MANIFEST
a308f6
index a88847b..6577ede 100644
a308f6
--- a/MANIFEST
a308f6
+++ b/MANIFEST
a308f6
@@ -1,5 +1,4 @@
a308f6
 lib/Mozilla/CA.pm
a308f6
-lib/Mozilla/CA/cacert.pem
a308f6
 Makefile.PL
a308f6
 MANIFEST			This list of files
a308f6
 README
a308f6
diff --git a/Makefile.PL b/Makefile.PL
a308f6
index 9faf720..a491813 100644
a308f6
--- a/Makefile.PL
a308f6
+++ b/Makefile.PL
a308f6
@@ -40,3 +40,11 @@ BEGIN {
a308f6
         ExtUtils::MakeMaker::WriteMakefile(%arg);
a308f6
     };
a308f6
 }
a308f6
+
a308f6
+package MY;
a308f6
+sub MY::libscan {
a308f6
+    my $name = shift->SUPER::libscan(@_);
a308f6
+    # Remove private certificate bundle
a308f6
+    if ($name =~ /cacert.pem\z/) { $name = '' };
a308f6
+    return $name;
a308f6
+}
a308f6
diff --git a/lib/Mozilla/CA.pm b/lib/Mozilla/CA.pm
a308f6
index 3947c90..6c3a506 100644
a308f6
--- a/lib/Mozilla/CA.pm
a308f6
+++ b/lib/Mozilla/CA.pm
a308f6
@@ -3,16 +3,10 @@ package Mozilla::CA;
a308f6
 use strict;
a308f6
 our $VERSION = '20160104';
a308f6
 
a308f6
-use Cwd ();
a308f6
 use File::Spec ();
a308f6
-use File::Basename qw(dirname);
a308f6
 
a308f6
 sub SSL_ca_file {
a308f6
-    my $file = File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem");
a308f6
-    if (!File::Spec->file_name_is_absolute($file)) {
a308f6
-	$file = File::Spec->catfile(Cwd::cwd(), $file);
a308f6
-    }
a308f6
-    return $file;
a308f6
+    return File::Spec->catfile('/etc/pki/tls/certs/ca-bundle.crt');
a308f6
 }
a308f6
 
a308f6
 1;
a308f6
-- 
a308f6
2.5.0
a308f6