summaryrefslogtreecommitdiff
path: root/lib/pkcs11_int.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-05-24 19:37:57 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-06-03 19:54:55 +0200
commit9f4fae2679f34e0e42b86e38cce00cec60f149bb (patch)
tree8730deb5680a763997ac3f585c2be5d718077eb4 /lib/pkcs11_int.h
parentdf646c6712a91db5e314268829d835c046d15b57 (diff)
downloadgnutls-9f4fae2679f34e0e42b86e38cce00cec60f149bb.tar.gz
Simplified internal API. The only question that remains now is how to handle
the gnutls_pkcs11_privkey_t. Currently it opens a session and maintains a handle to the object. This will require locks to be added on operations. Alternatively new sessions may be opened for each operation performed. This is guarranteed by PKCS #11 to be thread safe but will of course require to ask for the PIN again.
Diffstat (limited to 'lib/pkcs11_int.h')
-rw-r--r--lib/pkcs11_int.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pkcs11_int.h b/lib/pkcs11_int.h
index 2eea03cb78..63e73e0220 100644
--- a/lib/pkcs11_int.h
+++ b/lib/pkcs11_int.h
@@ -62,9 +62,13 @@ int pkcs11_info_to_url(const struct pkcs11_url_info* info, char** url);
#define SESSION_WRITE 1
#define SESSION_LOGIN 2
int pkcs11_open_session (pakchois_session_t** _pks, struct pkcs11_url_info *info, unsigned int flags);
-int _pkcs11_traverse_tokens (find_func_t find_func, void* input, int leave_session, unsigned int flags);
+int _pkcs11_traverse_tokens (find_func_t find_func, void* input, unsigned int flags);
ck_object_class_t pkcs11_strtype_to_class(const char* type);
int pkcs11_token_matches_info( struct pkcs11_url_info* info, struct ck_token_info* tinfo);
+/* flags are SESSION_* */
+int pkcs11_find_object (pakchois_session_t** _pks, ck_object_handle_t* _obj,
+ struct pkcs11_url_info *info, unsigned int flags);
+
#endif