aboutsummaryrefslogtreecommitdiff
path: root/ks_flash.c
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-06-24 13:12:17 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-06-24 13:12:17 +0200
commit155f2d9cede0a650a49a13f4e47e1768919ee4ca (patch)
treef7d8e804cdc46be8fb3712d29017568fe8d4eefa /ks_flash.c
parent715159e83b97e78a779bfeb38d634decd8e499fc (diff)
Use hal_error_t as suggested by Rob.
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;
}