aboutsummaryrefslogtreecommitdiff
path: root/ks_volatile.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-01 19:03:05 -0400
committerRob Austein <sra@hactrn.net>2016-09-01 19:03:05 -0400
commit65e8ef470b34a9c7af92f377da297095a0251890 (patch)
tree2e7213eb14424155fb6146e5f086052e5d756bf1 /ks_volatile.c
parentc2b116a5e46ed89bf1426def0c447d2e46cc9474 (diff)
Move in-memory keystore from client to server. Whack with club until compiles.
Fixes for various minor issues found while integrating with sw/stm32. Moving the in-memory keystore (PKCS #11 session objects, etc) from the client library to the HSM was on the near term to-do list in any case, doing it now turned out to be the easiest way to solve one of the build problems.
Diffstat (limited to 'ks_volatile.c')
-rw-r--r--ks_volatile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ks_volatile.c b/ks_volatile.c
index 147e6c9..155ae04 100644
--- a/ks_volatile.c
+++ b/ks_volatile.c
@@ -157,7 +157,7 @@ static hal_error_t ks_store(hal_ks_t *ks,
uint8_t kek[KEK_LENGTH];
size_t kek_len;
- if ((err = hal_ks_get_kek(kek, &kek_len, sizeof(kek))) == HAL_OK)
+ if ((err = hal_get_kek(kek, &kek_len, sizeof(kek))) == HAL_OK)
err = hal_aes_keywrap(NULL, kek, kek_len, der, der_len, k.der, &k.der_len);
memset(kek, 0, sizeof(kek));
@@ -223,7 +223,7 @@ static hal_error_t ks_fetch(hal_ks_t *ks,
*der_len = der_max;
- if ((err = hal_ks_get_kek(kek, &kek_len, sizeof(kek))) == HAL_OK)
+ if ((err = hal_get_kek(kek, &kek_len, sizeof(kek))) == HAL_OK)
err = hal_aes_keyunwrap(NULL, kek, kek_len, k->der, k->der_len, der, der_len);
memset(kek, 0, sizeof(kek));