Bug 472790, default to sha512 hashes for release updates, r=bhearsum
git-svn-id: svn://10.0.0.236/trunk@257279 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
86e69d8c3a
commit
516e9e3790
@ -81,7 +81,7 @@ use vars qw($PID_FILE
|
||||
$ST_SIZE );
|
||||
|
||||
$PID_FILE = 'patcher2.pid';
|
||||
$DEFAULT_HASH_TYPE = 'SHA1';
|
||||
$DEFAULT_HASH_TYPE = 'SHA512';
|
||||
$DEFAULT_CVSROOT = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
|
||||
$DEFAULT_HGROOT = 'http://hg.mozilla.org/mozilla-central';
|
||||
|
||||
|
||||
@ -359,13 +359,12 @@ sub HashFile {
|
||||
die "ASSERT: HashFile(): null file\n" if (not defined($args{'file'}));
|
||||
|
||||
my $fileToHash = $args{'file'};
|
||||
my $hashFunction = lc($args{'type'}) || 'md5';
|
||||
my $hashFunction = lc($args{'type'}) || 'sha512';
|
||||
my $dumpOutput = $args{'output'} || 0;
|
||||
my $ignoreErrors = $args{'ignoreErrors'} || 0;
|
||||
|
||||
die 'ASSERT: HashFile(): invalid hashFunction; use md5/sha1: ' .
|
||||
"$hashFunction\n" if
|
||||
($hashFunction ne 'md5' && $hashFunction ne 'sha1');
|
||||
die 'ASSERT: HashFile(): invalid hashFunction; use md5/sha1/sha256/sha384/sha512: ' .
|
||||
"$hashFunction\n" if ($hashFunction !~ '^(md5|sha1|sha256|sha384|sha512)$');
|
||||
|
||||
if (not(-f $fileToHash) || not(-r $fileToHash)) {
|
||||
if ($ignoreErrors) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user