From f69082acb05fa2013baed6e919b15a65b6b34aaa Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sat, 20 Sep 2008 12:51:39 +0000 Subject: Fix the endianness issue also for the bundled sha1 functions. (Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686) --- .../otpcalc/files/otpcalc-0.97-sha1-byteorder.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sys-auth/otpcalc/files') diff --git a/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch b/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch index 99cb08e3b8a5..f799bf4e25de 100644 --- a/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch +++ b/sys-auth/otpcalc/files/otpcalc-0.97-sha1-byteorder.patch @@ -10,6 +10,23 @@ + message[i] = digest[(i&4)+3-(i&3)]; } +--- otpCalc-0.97-orig/sha1.h 2001-06-11 10:13:15.000000000 +0200 ++++ otpCalc-0.97/sha1.h 2008-09-20 14:44:15.000000000 +0200 +@@ -1,3 +1,5 @@ ++#include "config.h" ++ + #ifndef i386 + typedef long int int64; + typedef unsigned long int uint64; +@@ -28,7 +30,7 @@ + + #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +-#ifdef WORDS_BIGENDIAN ++#ifndef WORDS_BIGENDIAN + #define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ + |(rol(block->l[i],8)&0x00FF00FF)) + #else --- otpCalc-0.97-orig/otpCalc.man 2008-09-17 22:23:00.000000000 +0200 +++ otpCalc-0.97/otpCalc.man 2008-09-17 22:23:47.000000000 +0200 @@ -47,9 +47,6 @@ -- cgit v1.2.3-65-gdbad