aboutsummaryrefslogtreecommitdiff
path: root/tests/test-rsa.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-12-21 16:22:20 -0500
committerRob Austein <sra@hactrn.net>2015-12-21 16:22:20 -0500
commit36f9b6627d41f72af38be1d819f37c20a11f43c5 (patch)
tree15287c76d9da007c0488ab3a68ea831a4f11739b /tests/test-rsa.c
parent905db64f075752de96c80eb4e3bd431342bb9700 (diff)
Fix names of private key DER functions.
Diffstat (limited to 'tests/test-rsa.c')
-rw-r--r--tests/test-rsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-rsa.c b/tests/test-rsa.c
index e7e831e..2872250 100644
--- a/tests/test-rsa.c
+++ b/tests/test-rsa.c
@@ -148,19 +148,19 @@ static int test_gen(const hal_core_t *core,
size_t der_len = 0;
- if ((err = hal_rsa_key_to_der(key1, NULL, &der_len, 0)) != HAL_OK) {
+ if ((err = hal_rsa_private_key_to_der(key1, NULL, &der_len, 0)) != HAL_OK) {
printf("Getting DER length of RSA key failed: %s\n", hal_error_string(err));
return 0;
}
uint8_t der[der_len];
- if ((err = hal_rsa_key_to_der(key1, der, &der_len, sizeof(der))) != HAL_OK) {
+ if ((err = hal_rsa_private_key_to_der(key1, der, &der_len, sizeof(der))) != HAL_OK) {
printf("Converting RSA key to DER failed: %s\n", hal_error_string(err));
return 0;
}
- if ((err = hal_rsa_key_from_der(&key2, keybuf2, sizeof(keybuf2), der, sizeof(der))) != HAL_OK) {
+ if ((err = hal_rsa_private_key_from_der(&key2, keybuf2, sizeof(keybuf2), der, sizeof(der))) != HAL_OK) {
printf("Converting RSA key back from DER failed: %s\n", hal_error_string(err));
return 0;
}