diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2013-05-21 10:46:28 -0700 |
---|---|---|
committer | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2013-11-24 05:40:19 +0100 |
commit | 047c98a2c1b9a9dfc4568b1b1471aab7cfcae606 (patch) | |
tree | 52473af309cea84433da82b219450cfba3c6c440 /payloads/libpayload/crypto | |
parent | c6f0997ffcfc5c622c2901e95efb4ca97974aadd (diff) |
libpayload: fix wrong endian assumption in sha1.c
Not all platforms !x86 are big endian, hence actually look
at the CONFIG_LITTLE_ENDIAN flag instead of CONFIG_ARCH_X86.
Change-Id: Ibbd8f48b377a1121dd1e045834a94a2d67eda2ab
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/56066
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-on: http://review.coreboot.org/4236
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload/crypto')
-rw-r--r-- | payloads/libpayload/crypto/sha1.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/payloads/libpayload/crypto/sha1.c b/payloads/libpayload/crypto/sha1.c index 3c97bf1895..c973e183db 100644 --- a/payloads/libpayload/crypto/sha1.c +++ b/payloads/libpayload/crypto/sha1.c @@ -30,18 +30,12 @@ typedef unsigned int u_int; /* Moved from libpayload.h */ -#ifdef CONFIG_ARCH_X86 +#ifdef CONFIG_LITTLE_ENDIAN #define BYTE_ORDER LITTLE_ENDIAN #else #define BYTE_ORDER BIG_ENDIAN #endif -#if 0 -#include <sys/param.h> -#include <string.h> -#include <sha1.h> -#endif - #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* |