summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-04-12 06:13:20 +0000
committerNorbert Preining <preining@logic.at>2016-04-12 06:13:20 +0000
commit4088fa98e12fce781d667128e93f04a006bf2be4 (patch)
treec641c5a62115098cd9a1e8116020dd1015cf125c /Master/tlpkg/TeXLive/TLUtils.pm
parent98238815b3c416ebb82c13c5ed1083b33085df8f (diff)
get rid of verify_download, fix verifications
git-svn-id: svn://tug.org/texlive/trunk@40460 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm34
1 files changed, 2 insertions, 32 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 9d901cf8b0a..6d02404fb48 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -103,7 +103,6 @@ C<TeXLive::TLUtils> -- utilities used in TeX Live infrastructure
TeXLive::TLUtils::setup_gpg();
TeXLive::TLUtils::verify_checksum($file, $url);
TeXLive::TLUtils::verify_signature($file, $url);
- TeXLive::TLUtils::verify_download($file, $url);
TeXLive::TLUtils::compare_tlpobjs($tlpA, $tlpB);
TeXLive::TLUtils::compare_tlpdbs($tlpdbA, $tlpdbB);
TeXLive::TLUtils::report_tlpdb_differences(\%ret);
@@ -182,7 +181,6 @@ BEGIN {
&setup_gpg
&verify_checksum
&verify_signature
- &verify_download
&wsystem
&xsystem
&run_cmd
@@ -3764,14 +3762,14 @@ In case of errors returns an informal message as second argument.
sub verify_signature {
my ($file, $url) = @_;
- my $signature_url = "$file.asc";
+ my $signature_url = "$url.asc";
# if we have $::gpg set, we try to verify cryptographic signatures
if ($::gpg) {
my $signature_file = download_to_temp_or_file($signature_url);
if ($signature_file) {
if (TeXLive::TLUtils::gpg_verify_signature($file, $signature_file)) {
- info("cryptographic signature of $file verified\n");
+ info("cryptographic signature of $url verified\n");
} else {
return(1, <<GPGERROR);
cryptograpic verification of
@@ -3790,34 +3788,6 @@ GPGERROR
return (0);
}
-=pod
-
-=item C<< verify_download($file, $url) >>
-
-Verifies a download of C<$url> into C<$file> by checking C<$url.sha512>
-and if gpg is available, verifying that with C<$url.sha512.asc>.
-
-Returns 0 on success, -1 on connection error, 1 on checksum error.
-In case of errors returns an informal message as second argument.
-
-=cut
-
-sub verify_download {
- my ($file, $url) = @_;
- # download checksum file
- my $checksum_url = "$url.$TeXLive::TLConfig::ChecksumExtension";
-
- my $checksum_file = download_to_temp_or_file($checksum_url);
- if (!$checksum_file) {
- # we do not accept if not even a checksum file is present, error out
- return(-1, "download did not succeed: $checksum_url");
- }
-
- # verify the checksum
- # this also does gpg signature check
- return verify_checksum($file, $checksum_file);
-}
-
sub gpg_verify_signature {
my ($file, $sig) = @_;
my ($file_quote, $sig_quote);