diff options
author | Randall Spangler <rspangler@chromium.org> | 2016-10-18 12:00:07 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2016-11-06 02:33:02 +0000 |
commit | 46a382d6136f2fd206fd8c95180dbb816c9ad5ce (patch) | |
tree | d97739fd8373f7b3a0844fc5dc854caa9919aae3 /futility/cmd_vbutil_key.c | |
parent | a03a164a76a97f3f6a60ddf18c466b38f8a77400 (diff) | |
download | vboot-46a382d6136f2fd206fd8c95180dbb816c9ad5ce.tar.gz |
vboot: Remove vboot1 cryptolib padding source
The old vboot1 cryptolib hard-coded many of its padding arrays in a
padding.c file. Use the equivalent vboot2 apis instead.
This change is almost exclusively on the host and test side; the only
firmware impact is on a single line of debug output.
BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge
Change-Id: If689ffd92f0255847bea2424950da4547b2c0df3
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400902
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'futility/cmd_vbutil_key.c')
-rw-r--r-- | futility/cmd_vbutil_key.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/futility/cmd_vbutil_key.c b/futility/cmd_vbutil_key.c index bc013127..15aa9edc 100644 --- a/futility/cmd_vbutil_key.c +++ b/futility/cmd_vbutil_key.c @@ -59,9 +59,9 @@ static void print_help(int argc, char *argv[]) " --algorithm <number> " "Signing algorithm to use with key:\n", argv[0]); - for (i = 0; i < kNumAlgorithms; i++) { + for (i = 0; i < VB2_ALG_COUNT; i++) { printf(" %d = (%s)\n", - i, vb1_crypto_name(i)); + i, vb2_get_crypto_algorithm_name(i)); } printf("\nOR\n\n" @@ -123,7 +123,7 @@ static int do_unpack(const char *infile, const char *outfile) if (pubkey) { printf("Public Key file: %s\n", infile); printf("Algorithm: %u %s\n", pubkey->algorithm, - vb1_crypto_name(pubkey->algorithm)); + vb2_get_crypto_algorithm_name(pubkey->algorithm)); printf("Key Version: %u\n", pubkey->key_version); printf("Key sha1sum: %s\n", packed_key_sha1_string(pubkey)); @@ -144,7 +144,8 @@ static int do_unpack(const char *infile, const char *outfile) enum vb2_crypto_algorithm alg = vb2_get_crypto_algorithm(privkey->hash_alg, privkey->sig_alg); - printf("Algorithm: %u %s\n", alg, vb1_crypto_name(alg)); + printf("Algorithm: %u %s\n", alg, + vb2_get_crypto_algorithm_name(alg)); if (outfile && VB2_SUCCESS != vb2_write_private_key(outfile, privkey)) { fprintf(stderr,"vbutil_key: Error writing key copy\n"); |