summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch')
-rw-r--r--mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch119
1 files changed, 119 insertions, 0 deletions
diff --git a/mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch b/mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch
new file mode 100644
index 000000000000..8e90ce2839d9
--- /dev/null
+++ b/mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch
@@ -0,0 +1,119 @@
+Patch-URL: http://cvs.fedoraproject.org/viewvc/devel/perl-Razor-Agent/razor-agents-2.85-use-sha-not-sha1.patch?view=log
+
+diff -urN razor-agents-2.85.orig/lib/Razor2/Client/Engine.pm razor-agents-2.85/lib/Razor2/Client/Engine.pm
+--- razor-agents-2.85.orig/lib/Razor2/Client/Engine.pm 2005-06-13 19:42:25.000000000 -0400
++++ razor-agents-2.85/lib/Razor2/Client/Engine.pm 2009-11-01 13:45:08.125369192 -0500
+@@ -1,7 +1,6 @@
+ package Razor2::Client::Engine;
+
+ use strict;
+-use Digest::SHA1 qw(sha1_hex);
+ use Data::Dumper;
+ use Razor2::Signature::Ephemeral;
+ use Razor2::Engine::VR8;
+diff -urN razor-agents-2.85.orig/lib/Razor2/Signature/Ephemeral.pm razor-agents-2.85/lib/Razor2/Signature/Ephemeral.pm
+--- razor-agents-2.85.orig/lib/Razor2/Signature/Ephemeral.pm 2003-03-03 18:09:50.000000000 -0500
++++ razor-agents-2.85/lib/Razor2/Signature/Ephemeral.pm 2009-11-01 13:45:08.125369192 -0500
+@@ -2,9 +2,13 @@
+
+ package Razor2::Signature::Ephemeral;
+ use strict;
+-use Digest::SHA1;
+ use Data::Dumper;
+
++BEGIN {
++ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 }
++ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) }
++}
++
+ sub new {
+
+ my ($class, %args) = @_;
+@@ -86,16 +90,12 @@
+ }
+
+ my $digest;
+- my $ctx = Digest::SHA1->new;
+
+ if ($seclength > 128) {
+- $ctx->add($section1);
+- $ctx->add($section2);
+- $digest = $ctx->hexdigest;
++ $digest = sha1_hex($section1, $section2);
+ } else {
+ debug("Sections too small... reverting back to orginal content.");
+- $ctx->add($content);
+- $digest = $ctx->hexdigest;
++ $digest = sha1_hex($content);
+ }
+
+ debug("Computed e-hash is $digest");
+diff -urN razor-agents-2.85.orig/lib/Razor2/Signature/Whiplash.pm razor-agents-2.85/lib/Razor2/Signature/Whiplash.pm
+--- razor-agents-2.85.orig/lib/Razor2/Signature/Whiplash.pm 2007-05-08 18:22:36.000000000 -0400
++++ razor-agents-2.85/lib/Razor2/Signature/Whiplash.pm 2009-11-01 13:45:08.124368017 -0500
+@@ -7,7 +7,10 @@
+
+ package Razor2::Signature::Whiplash;
+
+-use Digest::SHA1;
++BEGIN {
++ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 }
++ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) }
++}
+
+ sub new {
+
+@@ -683,13 +686,8 @@
+ # 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();
+-
+- $sha1->add($host);
+- $sig = substr $sha1->hexdigest, 0, 12;
+-
+- $sha1->add($corrected_length);
+- $sig .= substr $sha1->hexdigest, 0, 4;
++ $sig = substr sha1_hex($host), 0, 12;
++ $sig .= substr sha1_hex($corrected_length), 0, 4;
+
+ push @sigs, $sig;
+ $sig_meta{$sig} = [$host, $corrected_length];
+diff -urN razor-agents-2.85.orig/lib/Razor2/String.pm razor-agents-2.85/lib/Razor2/String.pm
+--- razor-agents-2.85.orig/lib/Razor2/String.pm 2005-06-13 17:09:59.000000000 -0400
++++ razor-agents-2.85/lib/Razor2/String.pm 2009-11-01 13:45:08.123368518 -0500
+@@ -1,11 +1,15 @@
+ # $Id$
+ package Razor2::String;
+
+-use Digest::SHA1 qw(sha1_hex);
+ use URI::Escape;
+ use Razor2::Preproc::enBase64;
+ use Data::Dumper;
+
++BEGIN {
++ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 }
++ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) }
++}
++
+ #use MIME::Parser;
+
+ require Exporter;
+@@ -69,15 +73,8 @@
+ return unless $text && $iv1 && $iv2;
+ die "no ref's allowed" if ref($text);
+
+- my $ctx = Digest::SHA1->new;
+- $ctx->add($iv2);
+- $ctx->add($text);
+- my $digest = $ctx->hexdigest;
+-
+- $ctx = Digest::SHA1->new;
+- $ctx->add($iv1);
+- $ctx->add($digest);
+- $digest = $ctx->hexdigest;
++ my $digest = sha1_hex($iv2, $text);
++ $digest = sha1_hex($iv1, $digest);
+
+ return (hextobase64($digest), $digest);
+ }