diff options
author | Norbert Preining <preining@logic.at> | 2016-04-12 06:05:44 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2016-04-12 06:05:44 +0000 |
commit | 4340d42cb5033cb3bd60ba643a3491f33f999319 (patch) | |
tree | 659e48f90e9236870d5210ed2a75003fc3f51c31 /Master/texmf-dist/scripts | |
parent | dbe3c5aacd7e82e3a0d4a7956c528040982307f8 (diff) |
use sha256 for remote tlpdb and location checks
git-svn-id: svn://tug.org/texlive/trunk@40423 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index ef9e56370d8..a0e98f8d616 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -2121,7 +2121,7 @@ sub write_w32_updater { push (@rst_info, "$pkg ^($oldrev^)"); next if ($opts{"dry-run"}); # create backup; make_container expects file name in a format: some-name.r[0-9]+ - my ($size, $md5, $fullname) = $localtlp->make_container("tar", $root, $temp, "__BACKUP_$pkg.r$oldrev"); + my ($size, $checksum, $fullname) = $localtlp->make_container("tar", $root, $temp, "__BACKUP_$pkg.r$oldrev"); if ($size <= 0) { tlwarn("$prg: Creation of backup container of $pkg failed.\n"); return 1; # backup failed? abort @@ -5836,7 +5836,7 @@ sub setup_one_remotetlpdb { my $local_copy_tlpdb_used = 0; if ($location =~ m;^(http|ftp)://;) { # first check that the saved tlpdb is present at all - my $loc_digest = Digest::MD5::md5_hex($location); + my $loc_digest = Digest::SHA::sha256_hex($location); my $loc_copy_of_remote_tlpdb = "$Master/$InfraLocation/texlive.tlpdb.$loc_digest"; ddebug("loc_digest = $loc_digest\n"); @@ -5845,11 +5845,11 @@ sub setup_one_remotetlpdb { ddebug("loc copy found!\n"); # we found the tlpdb matching the current location # check for the remote hash - my $path = "$location/$InfraLocation/$DatabaseName.md5"; + my $path = "$location/$InfraLocation/$DatabaseName.sha256"; ddebug("remote path of digest = $path\n"); my $fh = TeXLive::TLUtils::download_file($path, "|"); my $rem_digest; - if (read ($fh, $rem_digest, 32) != 32) { + if (read ($fh, $rem_digest, 64) != 64) { info(<<END_NO_INTERNET); No connection to the internet. Unable to download the checksum of the remote TeX Live database, @@ -5868,10 +5868,10 @@ END_NO_INTERNET $local_copy_tlpdb_used = 1; } else { ddebug("found remote digest: $rem_digest\n"); - my $rem_copy_digest = TeXLive::TLUtils::tlmd5($loc_copy_of_remote_tlpdb); + my $rem_copy_digest = TeXLive::TLUtils::tlsha256($loc_copy_of_remote_tlpdb); ddebug("rem_copy_digest = $rem_copy_digest\n"); if ($rem_copy_digest eq $rem_digest) { - debug("md5 of local copy identical with remote hash\n"); + debug("sha256 of local copy identical with remote hash\n"); $remotetlpdb = TeXLive::TLPDB->new(root => $location, tlpdbfile => $loc_copy_of_remote_tlpdb); $local_copy_tlpdb_used = 1; @@ -5958,7 +5958,7 @@ FROZEN # make sure that the writeout of the tlpdb is done in UNIX mode # since otherwise the sha256 will change. if (!$local_copy_tlpdb_used && $location =~ m;^(http|ftp)://;) { - my $loc_digest = Digest::MD5::md5_hex($location); + my $loc_digest = Digest::SHA::sha256_hex($location); my $loc_copy_of_remote_tlpdb = "$Master/$InfraLocation/texlive.tlpdb.$loc_digest"; my $tlfh; |