aboutsummaryrefslogtreecommitdiff
path: root/hal_internal.h
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-06-08 17:35:40 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-06-08 17:35:40 +0200
commita97235d07de43f504caa499b845b740878dae57b (patch)
tree1298ef18c554b3a5da64f60f9647eadecfa7500b /hal_internal.h
parentabfe36f702e4f468e83084b4163d2993001814b5 (diff)
Implement flash keystore storage. Most of it is still untested.
Diffstat (limited to 'hal_internal.h')
-rw-r--r--hal_internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/hal_internal.h b/hal_internal.h
index 60aed3b..7de434e 100644
--- a/hal_internal.h
+++ b/hal_internal.h
@@ -250,7 +250,7 @@ extern const hal_rpc_pkey_dispatch_t hal_rpc_local_pkey_dispatch, hal_rpc_remote
* one for RSA keys, one for EC keys, because the RSA keys are so much
* larger than the EC keys. This led to unnecessarily complex and
* duplicated code, so for now we treat all keys the same, and waste
- * the unneded space in the case of EC keys.
+ * the unneeded space in the case of EC keys.
*
* Sizes for ASN.1-encoded keys, this may not be exact due to ASN.1
* INTEGER encoding rules but should be good enough for buffer sizing:
@@ -281,11 +281,12 @@ typedef struct {
hal_key_type_t type;
hal_curve_name_t curve;
hal_key_flags_t flags;
+ uint32_t ks_internal; /* keystorage driver specific */
+ uint8_t in_use;
uint8_t name[HAL_RPC_PKEY_NAME_MAX];
size_t name_len;
uint8_t der[HAL_KS_WRAPPED_KEYSIZE];
size_t der_len;
- uint8_t in_use;
} hal_ks_key_t;
#ifndef HAL_PIN_SALT_LENGTH
@@ -302,6 +303,8 @@ typedef struct {
#if HAL_STATIC_PKEY_STATE_BLOCKS > 0
hal_ks_key_t keys[HAL_STATIC_PKEY_STATE_BLOCKS];
+#else
+ #warning No keys in keydb
#endif
hal_ks_pin_t wheel_pin;