summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm')
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
index 1e22f354d4..f424d7e6a2 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
@@ -1,4 +1,4 @@
-# $Id: TLDownload.pm 61372 2021-12-21 22:46:16Z karl $
+# $Id: TLDownload.pm 69328 2024-01-07 11:11:02Z preining $
# TeXLive::TLDownload.pm - module for abstracting the download modes
# Copyright 2009-2021 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -11,7 +11,7 @@ package TeXLive::TLDownload;
use TeXLive::TLUtils;
use TeXLive::TLConfig;
-my $svnrev = '$Revision: 61372 $';
+my $svnrev = '$Revision: 69328 $';
my $_modulerevision;
if ($svnrev =~ m/: ([0-9]+) /) {
$_modulerevision = $1;
@@ -40,10 +40,11 @@ if ($@) {
sub new
{
my $class = shift;
+ my %params = @_;
my $self = {};
$self->{'initcount'} = 0;
bless $self, $class;
- $self->reinit();
+ $self->reinit(defined($params{'certificates'}) ? $params{'certificates'} : "");
return $self;
}
@@ -52,6 +53,7 @@ sub new
sub reinit {
my $self = shift;
+ my $certs = shift;
# Irritatingly, as of around version 6.52, when env_proxy is set, LWP
# started unconditionally complaining if the environment contains
@@ -68,6 +70,14 @@ sub reinit {
@env_proxy = ("env_proxy", 1);
}
#
+ # Set HTTPS_CA_FILE to the TL provided certificate bundle
+ # for systems that don't have a system-wide certificate bundle
+ # in particular MacOS.
+ if ((! exists $ENV{'HTTPS_CA_FILE'}) && $certs) {
+ debug("Setting env var HTTPS_CA_FILE to " . $certs ."\n");
+ $ENV{'HTTPS_CA_FILE'} = $certs
+ }
+ #
my $ua = LWP::UserAgent->new(
agent => "texlive/lwp",
# use LWP::ConnCache, and keep 1 connection open