aboutsummaryrefslogtreecommitdiff
path: root/ks_attribute.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-10-14 19:24:34 -0400
committerRob Austein <sra@hactrn.net>2016-10-14 19:24:34 -0400
commit46e73ec4d2bb235a4905a21feb33705b696edf5f (patch)
tree5e6c48507fd45e4d1793a1d4688b5cc0661bd444 /ks_attribute.c
parent015eefa32f54f84c56bb7c6d36c0edcc104a69e8 (diff)
Keystore attribute code. Not really tested.
Passes PKCS #11 "make test" but nothing uses the new attribute code yet. Refactored some of the flash block update code. Attribute code is annoyingly verbose, might be possible to refactor some of that.
Diffstat (limited to 'ks_attribute.c')
-rw-r--r--ks_attribute.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/ks_attribute.c b/ks_attribute.c
index 248f98d..0c71345 100644
--- a/ks_attribute.c
+++ b/ks_attribute.c
@@ -111,18 +111,6 @@ hal_error_t hal_ks_attribute_scan(const uint8_t * const bytes, const size_t byte
return HAL_OK;
}
-/*
- * Given scan(), delete() and insert() should be relatively simple.
- *
- * delete() does a scan to find the attribute it wants to delete, and,
- * if found, uses memmove() to copy the rest down.
- *
- * insert() does a delete to get rid of old value, if any, then does
- * another scan, checks length what we want to insert against
- * total_len returned by the scan, and either appends the new
- * attribute or returns error code saying it couldn't.
- */
-
hal_error_t hal_ks_attribute_delete(uint8_t *bytes, const size_t bytes_len,
hal_rpc_pkey_attribute_t *attributes, unsigned *attributes_len,
size_t *total_len,