aboutsummaryrefslogtreecommitdiff
path: root/tests/test-rsa.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-06-24 16:53:01 -0400
committerRob Austein <sra@hactrn.net>2015-06-24 16:53:01 -0400
commit10dfb62866134658e1ad97914b3d1c3a7b0d7f50 (patch)
tree5c1ea7a542631172bb4678bf2c3334f1bbc5e1e9 /tests/test-rsa.c
parenta3b7050c53a27d4cfeb350fb86e738f623e99e0c (diff)
Rework API for loading keys from components. Relax key size
constraints to allow any key size within our supported range, since hsmbully seems to want to twist this knob to every possible setting.
Diffstat (limited to 'tests/test-rsa.c')
-rw-r--r--tests/test-rsa.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test-rsa.c b/tests/test-rsa.c
index fb53f69..594687c 100644
--- a/tests/test-rsa.c
+++ b/tests/test-rsa.c
@@ -91,16 +91,16 @@ static int test_decrypt(const char * const kind, const rsa_tc_t * const tc)
hal_rsa_key_t key = { NULL };
hal_error_t err = HAL_OK;
- if ((err = hal_rsa_key_load(HAL_RSA_PRIVATE, &key,
- keybuf, sizeof(keybuf),
- tc->n.val, tc->n.len,
- tc->e.val, tc->e.len,
- tc->d.val, tc->d.len,
- tc->p.val, tc->p.len,
- tc->q.val, tc->q.len,
- tc->u.val, tc->u.len,
- tc->dP.val, tc->dP.len,
- tc->dQ.val, tc->dQ.len)) != HAL_OK) {
+ if ((err = hal_rsa_key_load_private(&key,
+ keybuf, sizeof(keybuf),
+ tc->n.val, tc->n.len,
+ tc->e.val, tc->e.len,
+ tc->d.val, tc->d.len,
+ tc->p.val, tc->p.len,
+ tc->q.val, tc->q.len,
+ tc->u.val, tc->u.len,
+ tc->dP.val, tc->dP.len,
+ tc->dQ.val, tc->dQ.len)) != HAL_OK) {
printf("RSA CRT key load failed: %s\n", hal_error_string(err));
return 0;
}