Show
Ignore:
Timestamp:
01/01/12 13:50:24 (5 months ago)
Author:
max
Message:

Shepherd: Use Digest::SHA instead of Digest::SHA1. Updated status to follow.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/applications/shepherd

    r1390 r1394  
    4949&require_module("Algorithm::Diff"); 
    5050&require_module("List::Compare"); 
    51 &require_module("Digest::SHA1"); 
     51&require_module("Digest::SHA"); 
    5252&require_module("Fcntl"); 
    5353 
     
    497497{ 
    498498    my $file = shift; 
    499     my $sha1 = Digest::SHA1->new(); 
     499    my $sha1 = Digest::SHA->new(); 
    500500 
    501501    open(F,"<$file") || return -1; 
     
    16701670        # check the checksum 
    16711671        if (defined $csum) { 
    1672             my $sha1 = Digest::SHA1->new(); 
    1673             $sha1->add($response->content); 
    1674             my $rcsum = $sha1->hexdigest; 
     1672            my $sha = Digest::SHA->new(); 
     1673            $sha->add($response->content); 
     1674            my $rcsum = $sha->hexdigest; 
    16751675            if ($rcsum ne $csum) { 
    16761676                &log("$url corrupt: expected checksum $csum but got ".$rcsum."\n");