Changes for Debian Wheezy.

Replace Digest::SHA1 with Digest::SHA.

Installation of install libdigest-sha-perl
is necessary.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2014-02-23 19:54:29 +01:00
parent 7eded19b39
commit 121fcbc15f
2 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
# vim: set syntax=perl ts=4 ai si:
use MIME::Base64();
use Digest::SHA1();
use Digest::SHA();
#
# local_filter_cancel
@ -77,7 +77,7 @@ sub verify_cancel_key($$$) {
my $key;
if ($1 eq 'sha1') {
$key = Digest::SHA1::sha1($2); }
$key = Digest::SHA::sha1($2); }
elsif ($1 eq 'md5') {
$key = Digest::MD5::md5($2);
}

View file

@ -2,7 +2,7 @@
# Do any initialization steps.
#
use Digest::MD5 qw(md5_base64);
use Digest::SHA1();
use Digest::SHA();
use Digest::HMAC_SHA1();
use MIME::Base64();
@ -25,7 +25,7 @@ sub filter_post {
elsif (exists( $hdr{"Supersedes"} )) {
my $key = calc_cancel_key($user, $hdr{"Supersedes"});
add_cancel_item(\%hdr, 'Cancel-Key', $key);
}
}
return $rval;
}
@ -48,6 +48,6 @@ sub calc_cancel_key($$) {
sub add_cancel_lock($$) {
my ( $r_hdr, $user ) = @_;
my $key = calc_cancel_key($user, $r_hdr->{'Message-ID'});
my $lock = MIME::Base64::encode(Digest::SHA1::sha1($key), '');
my $lock = MIME::Base64::encode(Digest::SHA::sha1($key), '');
add_cancel_item($r_hdr, 'Cancel-Lock', $lock);
}
}