diff options
author | Bill Richardson <wfrichar@chromium.org> | 2010-10-25 11:39:16 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2010-10-25 11:39:16 -0700 |
commit | f356db46a6da14ae503a445e4d3a71217071b7ab (patch) | |
tree | b06dc18cf9adae4ea43a28c482334caa147fdc98 /utility/vbutil_keyblock.c | |
parent | f5529068ecbfc6770233ab76a04849d879067ee8 (diff) | |
download | vboot-f356db46a6da14ae503a445e4d3a71217071b7ab.tar.gz |
Recommit a change that got accidently uncommitted.
Display keyblock information, even if not checking the signature.
Change-Id: Ie96ac39e2598fdfdc49898f92fd528edefd36313
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3602014
TBR=none
Diffstat (limited to 'utility/vbutil_keyblock.c')
-rw-r--r-- | utility/vbutil_keyblock.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/utility/vbutil_keyblock.c b/utility/vbutil_keyblock.c index ff1b44be..dd13eb3d 100644 --- a/utility/vbutil_keyblock.c +++ b/utility/vbutil_keyblock.c @@ -127,12 +127,7 @@ static int Unpack(const char* infile, const char* datapubkey, /* If the block is signed, then verify it with the signing public key, since KeyBlockRead() only verified the hash. */ - if (block->key_block_signature.sig_size) { - if (!signpubkey) { - fprintf(stderr, - "vbutil_keyblock: keyblock requires public key to verify\n"); - return 1; - } + if (block->key_block_signature.sig_size && signpubkey) { sign_key = PublicKeyRead(signpubkey); if (!sign_key) { fprintf(stderr, "vbutil_keyblock: Error reading signpubkey.\n"); @@ -142,16 +137,12 @@ static int Unpack(const char* infile, const char* datapubkey, fprintf(stderr, "vbutil_keyblock: Error verifying key block.\n"); return 1; } - printf("Signature algorithm: %" PRIu64 " %s\n", sign_key->algorithm, - (sign_key->algorithm < kNumAlgorithms ? - algo_strings[sign_key->algorithm] : "(invalid)")); Free(sign_key); - } else { - printf("Signature Algorithm: <none>\n"); } printf("Key block file: %s\n", infile); - printf("Flags: %" PRIu64 "\n", block->key_block_flags); + printf("Signature %s\n", sign_key ? "valid" : "ignored"); + printf("Flags: %" PRIu64 " ", block->key_block_flags); if (block->key_block_flags & KEY_BLOCK_FLAG_DEVELOPER_0) printf(" !DEV"); if (block->key_block_flags & KEY_BLOCK_FLAG_DEVELOPER_1) |