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 /tests/vb20_common3_tests.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 'tests/vb20_common3_tests.c')
-rw-r--r-- | tests/vb20_common3_tests.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/vb20_common3_tests.c b/tests/vb20_common3_tests.c index b4e5bf5e..e5538673 100644 --- a/tests/vb20_common3_tests.c +++ b/tests/vb20_common3_tests.c @@ -515,8 +515,10 @@ int test_permutation(int signing_key_algorithm, int data_key_algorithm, const char *keys_dir) { char filename[1024]; - int signing_rsa_len = siglen_map[signing_key_algorithm] * 8; - int data_rsa_len = siglen_map[data_key_algorithm] * 8; + int signing_rsa_len = 8 * vb2_rsa_sig_size( + vb2_crypto_to_signature(signing_key_algorithm)); + int data_rsa_len = 8 * vb2_rsa_sig_size( + vb2_crypto_to_signature(data_key_algorithm)); int retval = 1; struct vb2_private_key *signing_private_key = NULL; @@ -524,9 +526,9 @@ int test_permutation(int signing_key_algorithm, int data_key_algorithm, struct vb2_packed_key *data_public_key = NULL; printf("***Testing signing algorithm: %s\n", - algo_strings[signing_key_algorithm]); + vb2_get_crypto_algorithm_name(signing_key_algorithm)); printf("***With data key algorithm: %s\n", - algo_strings[data_key_algorithm]); + vb2_get_crypto_algorithm_name(data_key_algorithm)); snprintf(filename, sizeof(filename), "%s/key_rsa%d.pem", keys_dir, signing_rsa_len); |