diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-12 18:03:25 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-15 17:54:55 +0100 |
commit | ff009f8a671e6ddd02a684bb1707a2a797fe4600 (patch) | |
tree | 3f3d5162a64f0addb0ad2d1acba91eae46f8ef1e /trust/session.h | |
parent | 3fc6365093ad07b2eb5ef859093c5c5eb56ee700 (diff) | |
download | p11-kit-ff009f8a671e6ddd02a684bb1707a2a797fe4600.tar.gz |
trust: Refactor to include concept of the index
* The index holds PKCS#11 objects whether for the token or for the session.
* The index provides hook for a builder to expand or validate objects
being added to the index.
* In addition theres a change hook so that a builder can maintain state
between objects, such as the compat NSS trust objects.
https://bugs.freedesktop.org/show_bug.cgi?id=62329
Diffstat (limited to 'trust/session.h')
-rw-r--r-- | trust/session.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/trust/session.h b/trust/session.h index 97aedb1..c2626d0 100644 --- a/trust/session.h +++ b/trust/session.h @@ -32,6 +32,7 @@ * Author: Stef Walter <stefw@redhat.com> */ +#include "index.h" #include "pkcs11.h" #include "token.h" @@ -42,7 +43,7 @@ typedef void (* p11_session_cleanup) (void *data); typedef struct { CK_SESSION_HANDLE handle; - p11_dict *objects; + p11_index *index; p11_token *token; CK_BBOOL loaded; @@ -55,22 +56,6 @@ p11_session * p11_session_new (p11_token *token); void p11_session_free (void *data); -CK_RV p11_session_add_object (p11_session *session, - CK_ATTRIBUTE *attrs, - CK_OBJECT_HANDLE *handle); - -CK_RV p11_session_del_object (p11_session *session, - CK_OBJECT_HANDLE handle); - -CK_ATTRIBUTE * p11_session_get_object (p11_session *session, - CK_OBJECT_HANDLE handle, - CK_BBOOL *token); - -CK_RV p11_session_set_object (p11_session *session, - CK_OBJECT_HANDLE handle, - CK_ATTRIBUTE *template, - CK_ULONG count); - void p11_session_set_operation (p11_session *session, p11_session_cleanup cleanup, void *operation); |