summaryrefslogtreecommitdiff
path: root/trust/index.h
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2013-07-08 18:38:38 +0200
committerStef Walter <stef@thewalter.net>2013-07-08 18:38:38 +0200
commitdcca67d72544e394f43a8c62840692c85d5b5b29 (patch)
tree3da7943c17378457d40e10a9d72a96f725221922 /trust/index.h
parent3318c443b7a3660f0aee80cfa0d5e915d3a21734 (diff)
trust: Fix various issues writing objects in trust token
* Create directory before trying to write files to it * Handle write failures appropriately Refactor how we build and store objects in the index to handle the above cases properly.
Diffstat (limited to 'trust/index.h')
-rw-r--r--trust/index.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/trust/index.h b/trust/index.h
index 6603092..192bfcd 100644
--- a/trust/index.h
+++ b/trust/index.h
@@ -44,8 +44,14 @@ typedef struct _p11_index p11_index;
typedef CK_RV (* p11_index_build_cb) (void *data,
p11_index *index,
- CK_ATTRIBUTE **attrs,
- CK_ATTRIBUTE *merge);
+ CK_ATTRIBUTE *attrs,
+ CK_ATTRIBUTE *merge,
+ CK_ATTRIBUTE **populate);
+
+typedef CK_RV (* p11_index_store_cb) (void *data,
+ p11_index *index,
+ CK_OBJECT_HANDLE handle,
+ CK_ATTRIBUTE **attrs);
typedef void (* p11_index_notify_cb) (void *data,
p11_index *index,
@@ -53,6 +59,7 @@ typedef void (* p11_index_notify_cb) (void *data,
CK_ATTRIBUTE *attrs);
p11_index * p11_index_new (p11_index_build_cb build,
+ p11_index_store_cb store,
p11_index_notify_cb notify,
void *data);