diff options
author | nagendra modadugu <ngm@google.com> | 2016-01-28 09:25:51 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-28 14:16:19 -0800 |
commit | 26bbc59b4629f44a93b87ed8c21e5f80699c7779 (patch) | |
tree | 854955a3e08d0fcea5d4d5e5a7dfed3ba03ae27a /test | |
parent | d60d263b83181aee7544f6e24afa13e441a45177 (diff) | |
download | chrome-ec-26bbc59b4629f44a93b87ed8c21e5f80699c7779.tar.gz |
Fix bug in software sha256_hash()
The implementation for sha256_hash() copied
and incorrect number of bytes to the output.
This change provides a fix and a test.
TEST=added test case
BRANCH=none
BUG=chrome-os-partner:43025,chrome-os-partner:47524
Change-Id: I74e98c6f5005a14dd5c0ca19ea7540622dd6c7d7
Signed-off-by: nagendra modadugu <ngm@google.com>
Reviewed-on: https://chromium-review.googlesource.com/324391
Commit-Ready: Nagendra Modadugu <ngm@google.com>
Tested-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/tpm_test/hash_test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/tpm_test/hash_test.py b/test/tpm_test/hash_test.py index fd8d0f4184..a5a1e522c7 100644 --- a/test/tpm_test/hash_test.py +++ b/test/tpm_test/hash_test.py @@ -37,6 +37,8 @@ test_inputs = ( (MODE_SHA256, 'start', 1, 'some more text, this time for sha256'), (MODE_SHA256, 'cont', 1, 'some more text, this time for sha256'), (MODE_SHA256, 'start', 2, 'this could be anything, we just need to'), + (MODE_SHA1, 'single', 3, 'interleave a SHA1 single calculation'), + (MODE_SHA256, 'single', 3, 'interleave a SHA256 single calculation'), (MODE_SHA1, 'start', 3, 'let\'s interleave a sha1 calculation'), (MODE_SHA256, 'cont', 2, 'fill up a second context with something'), (MODE_SHA256, 'cont', 1, 'let\'s feed some more into context 1'), |