From 121fcbc15fec7c04c43689f38ccbbbac2862a71e Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 23 Feb 2014 19:54:29 +0100 Subject: [PATCH] Changes for Debian Wheezy. Replace Digest::SHA1 with Digest::SHA. Installation of install libdigest-sha-perl is necessary. Signed-off-by: Thomas Hochstein --- filter/cleanfeed.local | 4 ++-- filter/filter_nnrpd.pl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/filter/cleanfeed.local b/filter/cleanfeed.local index eb23db4..3d37c7d 100644 --- a/filter/cleanfeed.local +++ b/filter/cleanfeed.local @@ -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); } diff --git a/filter/filter_nnrpd.pl b/filter/filter_nnrpd.pl index a66425b..738424c 100644 --- a/filter/filter_nnrpd.pl +++ b/filter/filter_nnrpd.pl @@ -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); -} \ No newline at end of file +}