Red Hat Bugzilla – Bug 196369
Need newer sha* hashes
Last modified: 2007-11-30 17:11:35 EST
Description of problem:
sha256sum, sha512sum etc. are present in upstream development but not in our
Version-Release number of selected component (if applicable):
I'm including a patch backported from upstream development (the backport was
blessed by the maintainer). It adds the new sha* commands and base64 ... and tests.
Created attachment 131378 [details]
Backport patch to add sha*sum and base64 hashing/encoding
Test cases failed on s390 (but succeeded on ia64).
It appears to be a bug in gcc/memcpy, since memcpy transforms the first four
bytes of a buffer from 128 to 9223372036854775808 (aka 0x8000000000000000).
Building with -fno-builtin avoids the problem. I'll submit a test case shortly.
Update: a better-controlled experiment suggests that the test failures are due
to a bug in gcc's -O2. When I compile sha512.c with -O1 and relink, the tests pass.
FYI, the s390 gcc -O2 problem is being tracked here:
Thanks for working out the problem! For the moment I've built coreutils with
-O1 on s390/s390x.