From 4340d42cb5033cb3bd60ba643a3491f33f999319 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 12 Apr 2016 06:05:44 +0000 Subject: use sha256 for remote tlpdb and location checks git-svn-id: svn://tug.org/texlive/trunk@40423 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist/scripts') 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(<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; -- cgit v1.2.3