diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2019-05-24 09:35:21 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-27 23:09:14 -0700 |
commit | 236bfb0bc3bd0aa37bd06702c25993446f9b6dba (patch) | |
tree | d63a35cfec1b0c429c328836f5562dc7289d36fa /utility | |
parent | 70f795f497da5b80f9b9891998759243021b17bd (diff) | |
download | vboot-236bfb0bc3bd0aa37bd06702c25993446f9b6dba.tar.gz |
tpmc: fix tpmc pcrextend error message
The PCR extension value size should not have been hardcoded, it is
different for different TPM specification versions.
BRANCH=none
BUG=none
TEST=the error message prints the correct expected input size for both
tpm and tpm2 case now.
Change-Id: I8e65181edff1e62bbaae46e622fe67f420cbab25
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1627640
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r-- | utility/tpmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utility/tpmc.c b/utility/tpmc.c index f5012eaf..dc41b03c 100644 --- a/utility/tpmc.c +++ b/utility/tpmc.c @@ -304,7 +304,8 @@ static uint32_t HandlerPCRExtend(void) { exit(OTHER_ERROR); } if (HexStringToArray(args[3], value, TPM_PCR_DIGEST)) { - fprintf(stderr, "<extend_hash> must be a 20-byte hex string\n"); + fprintf(stderr, "<extend_hash> must be a %d-byte hex string\n", + TPM_PCR_DIGEST); exit(OTHER_ERROR); } return TlclExtend(index, value, value); |