aboutsummaryrefslogtreecommitdiff
path: root/ks_flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'ks_flash.c')
-rw-r--r--ks_flash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ks_flash.c b/ks_flash.c
index 036e72e..159df5b 100644
--- a/ks_flash.c
+++ b/ks_flash.c
@@ -324,11 +324,11 @@ hal_error_t hal_ks_get_kek(uint8_t *kek,
(kek_max < bitsToBytes(256)) ? bitsToBytes(192) :
bitsToBytes(256));
- if (masterkey_volatile_read(kek, len) == HSM_MASTERKEY_SET) {
+ if (masterkey_volatile_read(kek, len) == LIBHAL_OK) {
*kek_len = len;
return LIBHAL_OK;
}
- if (masterkey_flash_read(kek, len) == HSM_MASTERKEY_SET) {
+ if (masterkey_flash_read(kek, len) == LIBHAL_OK) {
*kek_len = len;
return LIBHAL_OK;
}