diff options
-rw-r--r-- | board/cr50/tpm2/hash.c | 2 | ||||
-rw-r--r-- | test/tpm_test/hash_test.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/board/cr50/tpm2/hash.c b/board/cr50/tpm2/hash.c index 157100fd96..de4116052b 100644 --- a/board/cr50/tpm2/hash.c +++ b/board/cr50/tpm2/hash.c @@ -352,8 +352,6 @@ static void hash_command_handler(void *cmd_body, break; case 3: /* Process a buffer in a single shot. */ - if (!text_len) - break; /* * Error responses are just 1 byte in size, valid responses * are of various hash sizes. diff --git a/test/tpm_test/hash_test.py b/test/tpm_test/hash_test.py index 8bdfb16bdd..821f79e4a1 100644 --- a/test/tpm_test/hash_test.py +++ b/test/tpm_test/hash_test.py @@ -28,6 +28,8 @@ EMPTY_RESPONSE = ''.join('%c' % x for x in (0x80, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01)) test_inputs = ( # SHA mode cmd mode handle text + (MODE_SHA1, 'single', 0, ''), + (MODE_SHA256, 'single', 0, ''), (MODE_SHA1, 'single', 0, 'anything really will work here'), (MODE_SHA256, 'single', 0, 'some more text, this time for sha256'), (MODE_SHA256, 'start', 1, 'some more text, this time for sha256'), |