1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
Description: Use Digest::SHA instead of Digest::SHA1
Origin: vendor
Bug: http://bugs.debian.org/624579
Author: Salvatore Bonaccorso <carnil@debian.org>
Last-Update: 2011-05-21
--- a/META.yml
+++ b/META.yml
@@ -5,7 +5,7 @@ version: 2.84
version_from: lib/Razor2/Client/Version.pm
installdirs: site
requires:
- Digest::SHA1: 0
+ Digest::SHA: 0
File::Copy: 0
File::Spec: 0
Getopt::Long: 0
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -18,7 +18,7 @@ WriteMakefile (
VERSION_FROM => 'lib/Razor2/Client/Version.pm',
EXE_FILES => [ qw( bin/razor-client bin/razor-admin bin/razor-check bin/razor-report bin/razor-revoke ) ],
PREREQ_PM => {
- 'Digest::SHA1' => 0,
+ 'Digest::SHA' => 0,
'File::Copy' => 0,
'File::Spec' => 0,
'Getopt::Long' => 0,
--- a/lib/Razor2/String.pm
+++ b/lib/Razor2/String.pm
@@ -1,7 +1,7 @@
# $Id: String.pm,v 1.48 2005/06/13 21:09:59 vipul Exp $
package Razor2::String;
-use Digest::SHA1 qw(sha1_hex);
+use Digest::SHA qw(sha1_hex);
use URI::Escape;
use Razor2::Preproc::enBase64;
use Data::Dumper;
@@ -69,12 +69,12 @@ sub hmac2_sha1 {
return unless $text && $iv1 && $iv2;
die "no ref's allowed" if ref($text);
- my $ctx = Digest::SHA1->new;
+ my $ctx = Digest::SHA->new;
$ctx->add($iv2);
$ctx->add($text);
my $digest = $ctx->hexdigest;
- $ctx = Digest::SHA1->new;
+ $ctx = Digest::SHA->new;
$ctx->add($iv1);
$ctx->add($digest);
$digest = $ctx->hexdigest;
--- a/lib/Razor2/Client/Engine.pm
+++ b/lib/Razor2/Client/Engine.pm
@@ -1,7 +1,7 @@
package Razor2::Client::Engine;
use strict;
-use Digest::SHA1 qw(sha1_hex);
+use Digest::SHA qw(sha1_hex);
use Data::Dumper;
use Razor2::Signature::Ephemeral;
use Razor2::Engine::VR8;
--- a/lib/Razor2/Signature/Ephemeral.pm
+++ b/lib/Razor2/Signature/Ephemeral.pm
@@ -2,7 +2,7 @@
package Razor2::Signature::Ephemeral;
use strict;
-use Digest::SHA1;
+use Digest::SHA;
use Data::Dumper;
sub new {
@@ -86,7 +86,7 @@ sub hexdigest {
}
my $digest;
- my $ctx = Digest::SHA1->new;
+ my $ctx = Digest::SHA->new;
if ($seclength > 128) {
$ctx->add($section1);
--- a/lib/Razor2/Signature/Whiplash.pm
+++ b/lib/Razor2/Signature/Whiplash.pm
@@ -7,7 +7,7 @@
package Razor2::Signature::Whiplash;
-use Digest::SHA1;
+use Digest::SHA;
sub new {
@@ -683,7 +683,7 @@ sub whiplash {
# the value of length to the nearest multiple of ``length_error''.
# Take the first 20 hex chars from SHA1 and call it the signature.
- my $sha1 = Digest::SHA1->new();
+ my $sha1 = Digest::SHA->new();
$sha1->add($host);
$sig = substr $sha1->hexdigest, 0, 12;
|