summaryrefslogtreecommitdiff
blob: beaf08356665e2b682d2a5d1a96f61ed45048e6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
From 29a48e5da01acb1f5f35e3a47b04ec4db42e50b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20R=C3=BCger?= <manuel@rueg.eu>
Date: Sun, 31 May 2015 00:34:11 +0200
Subject: [PATCH] Remove Mozilla::CA dependency.


diff --git a/Build.PL b/Build.PL
index 841af36..b43b5fe 100644
--- a/Build.PL
+++ b/Build.PL
@@ -53,7 +53,6 @@ my $builder = $class->new(
         'List::AllUtils' => 0,
         'List::MoreUtils' => 0,
         'List::MoreUtils::XS' => 0,
-        'Mozilla::CA' =>  '20141217',
         'Regexp::Common' => 0,
         'Log::Log4perl' => 0,
         'Unicode::Collate' => '1.12',
diff --git a/bin/biber b/bin/biber
index 80ebd39..c4f8897 100755
--- a/bin/biber
+++ b/bin/biber
@@ -72,7 +72,6 @@ GetOptions(
            'sortfirstinits=s',
            'sortlocale|l=s',
            'sortupper=s',
-           'ssl-nointernalca',
            'ssl-noverify-host',
            'tool',
            'tool_align|tool-align',                 # legacy alias for output_align
@@ -658,12 +657,6 @@ default sorting (B<--collate|-C>). When
 using B<--fastsort|-f>, your OS collation locale determines
 this and this option is ignored (default is true).
 
-=item B<--ssl-nointernalca>
-
-Don't try to use the default Mozilla CA certificates when using HTTPS to fetch remote data.
-This assumes that the user will set one of the perl LWP::UserAgent module environment variables
-to find the CA certs.
-
 =item B<--ssl-noverify-host>
 
 Turn off host verification when using HTTPS to fetch remote data sources.
diff --git a/data/schemata/config.rnc b/data/schemata/config.rnc
index 9f96fec..2863e14 100644
--- a/data/schemata/config.rnc
+++ b/data/schemata/config.rnc
@@ -77,7 +77,6 @@ start = element config {
       map+
     }+
   }? &
-  element ssl-nointernalca     { "0" | "1" }? &
   element ssl-noverify-host    { "0" | "1" }? &
   element tool                 { "0" | "1" }? &
   element tool_config          { text }? &
diff --git a/data/schemata/config.rng b/data/schemata/config.rng
index 3bd7072..8ef9bee 100644
--- a/data/schemata/config.rng
+++ b/data/schemata/config.rng
@@ -352,14 +352,6 @@
           </element>
         </optional>
         <optional>
-          <element name="ssl-nointernalca">
-            <choice>
-              <value>0</value>
-              <value>1</value>
-            </choice>
-          </element>
-        </optional>
-        <optional>
           <element name="ssl-noverify-host">
             <choice>
               <value>0</value>
diff --git a/lib/Biber/Input/file/biblatexml.pm b/lib/Biber/Input/file/biblatexml.pm
index 4d1878b..8994c0f 100644
--- a/lib/Biber/Input/file/biblatexml.pm
+++ b/lib/Biber/Input/file/biblatexml.pm
@@ -97,19 +97,6 @@ sub extract_entries {
     else {
       if ($1) {                 # HTTPS
         # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues
-        # We have to explicitly set the cert path because otherwise the https module
-        # can't find the .pem when PAR::Packer'ed
-        # Have to explicitly try to require Mozilla::CA here to get it into %INC below
-        # It may, however, have been removed by some biber unpacked dists
-        if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and
-            not exists($ENV{PERL_LWP_SSL_CA_PATH}) and
-            not defined(Biber::Config->getoption('ssl-nointernalca')) and
-            eval {require Mozilla::CA}) {
-          # we assume that the default CA file is in .../Mozilla/CA/cacert.pem
-          (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} );
-          $dir =~ s/\/$//;      # splitpath sometimes leaves a trailing '/'
-          $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem');
-        }
 
         # fallbacks for, e.g., linux
         unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) {
diff --git a/lib/Biber/Input/file/bibtex.pm b/lib/Biber/Input/file/bibtex.pm
index 24b2772..c70e6e4 100644
--- a/lib/Biber/Input/file/bibtex.pm
+++ b/lib/Biber/Input/file/bibtex.pm
@@ -140,19 +140,6 @@ sub extract_entries {
     else {
       if ($1) {                 # HTTPS
         # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues
-        # We have to explicitly set the cert path because otherwise the https module
-        # can't find the .pem when PAR::Packer'ed
-        # Have to explicitly try to require Mozilla::CA here to get it into %INC below
-        # It may, however, have been removed by some biber unpacked dists
-        if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and
-            not exists($ENV{PERL_LWP_SSL_CA_PATH}) and
-            not defined(Biber::Config->getoption('ssl-nointernalca')) and
-            eval {require Mozilla::CA}) {
-          # we assume that the default CA file is in .../Mozilla/CA/cacert.pem
-          (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} );
-          $dir =~ s/\/$//;      # splitpath sometimes leaves a trailing '/'
-          $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem');
-        }
 
         # fallbacks for, e.g., linux
         unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) {
diff --git a/lib/Biber/Input/file/endnotexml.pm b/lib/Biber/Input/file/endnotexml.pm
index bf62a80..342b3b2 100644
--- a/lib/Biber/Input/file/endnotexml.pm
+++ b/lib/Biber/Input/file/endnotexml.pm
@@ -111,19 +111,6 @@ sub extract_entries {
     $logger->info("Data source '$source' is a remote EndNote XML datasource - fetching ...");
     if ($1) { # HTTPS
       # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues
-      # We have to explicitly set the cert path because otherwise the https module
-      # can't find the .pem when PAR::Packer'ed
-      # Have to explicitly try to require Mozilla::CA here to get it into %INC below
-      # It may, however, have been removed by some biber unpacked dists
-      if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and
-          not exists($ENV{PERL_LWP_SSL_CA_PATH}) and
-          not defined(Biber::Config->getoption('ssl-nointernalca')) and
-          eval {require Mozilla::CA}) {
-        # we assume that the default CA file is in .../Mozilla/CA/cacert.pem
-        (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} );
-        $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/'
-        $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem');
-      }
 
       # fallbacks for, e.g., linux
       unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) {
diff --git a/lib/Biber/Input/file/ris.pm b/lib/Biber/Input/file/ris.pm
index bc389c2..56f8d93 100644
--- a/lib/Biber/Input/file/ris.pm
+++ b/lib/Biber/Input/file/ris.pm
@@ -110,19 +110,6 @@ sub extract_entries {
     else {
       if ($1) {                 # HTTPS
         # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues
-        # We have to explicitly set the cert path because otherwise the https module
-        # can't find the .pem when PAR::Packer'ed
-        # Have to explicitly try to require Mozilla::CA here to get it into %INC below
-        # It may, however, have been removed by some biber unpacked dists
-        if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and
-            not exists($ENV{PERL_LWP_SSL_CA_PATH}) and
-            not defined(Biber::Config->getoption('ssl-nointernalca')) and
-            eval {require Mozilla::CA}) {
-          # we assume that the default CA file is in .../Mozilla/CA/cacert.pem
-          (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} );
-          $dir =~ s/\/$//;      # splitpath sometimes leaves a trailing '/'
-          $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem');
-        }
 
         # fallbacks for, e.g., linux
         unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) {
diff --git a/lib/Biber/Input/file/zoterordfxml.pm b/lib/Biber/Input/file/zoterordfxml.pm
index 6dbb3f9..15bc3f6 100644
--- a/lib/Biber/Input/file/zoterordfxml.pm
+++ b/lib/Biber/Input/file/zoterordfxml.pm
@@ -123,19 +123,6 @@ sub extract_entries {
     $logger->info("Data source '$source' is a remote Zotero RDF/XML data source - fetching ...");
     if ($1) { # HTTPS
       # use IO::Socket::SSL qw(debug99); # useful for debugging SSL issues
-      # We have to explicitly set the cert path because otherwise the https module
-      # can't find the .pem when PAR::Packer'ed
-      # Have to explicitly try to require Mozilla::CA here to get it into %INC below
-      # It may, however, have been removed by some biber unpacked dists
-      if (not exists($ENV{PERL_LWP_SSL_CA_FILE}) and
-          not exists($ENV{PERL_LWP_SSL_CA_PATH}) and
-          not defined(Biber::Config->getoption('ssl-nointernalca')) and
-          eval {require Mozilla::CA}) {
-        # we assume that the default CA file is in .../Mozilla/CA/cacert.pem
-        (my $vol, my $dir, undef) = File::Spec->splitpath( $INC{"Mozilla/CA.pm"} );
-        $dir =~ s/\/$//; # splitpath sometimes leaves a trailing '/'
-        $ENV{PERL_LWP_SSL_CA_FILE} = File::Spec->catpath($vol, "$dir/CA", 'cacert.pem');
-      }
 
       # fallbacks for, e.g., linux
       unless (exists($ENV{PERL_LWP_SSL_CA_FILE})) {
-- 
2.4.2