Added enumerator for PKCS#11 tokens
This commit is contained in:
@@ -44,6 +44,13 @@ typedef void (*pkcs11_manager_token_event_t)(void *data, pkcs11_library_t *p11,
|
||||
*/
|
||||
struct pkcs11_manager_t {
|
||||
|
||||
/**
|
||||
* Create an enumerator over all tokens.
|
||||
*
|
||||
* @return enumerator over (pkcs11_library_t*,CK_SLOT_ID)
|
||||
*/
|
||||
enumerator_t* (*create_token_enumerator)(pkcs11_manager_t *this);
|
||||
|
||||
/**
|
||||
* Destroy a pkcs11_manager_t.
|
||||
*/
|
||||
@@ -52,8 +59,20 @@ struct pkcs11_manager_t {
|
||||
|
||||
/**
|
||||
* Create a pkcs11_manager instance.
|
||||
*
|
||||
* @param cb token event callback function
|
||||
* @param data user data to pass to token event callback
|
||||
* @return instance
|
||||
*/
|
||||
pkcs11_manager_t *pkcs11_manager_create(pkcs11_manager_token_event_t cb,
|
||||
void *data);
|
||||
|
||||
|
||||
/**
|
||||
* Get the singleton instance of the manager
|
||||
*
|
||||
* @return instance, NULL if none available
|
||||
*/
|
||||
pkcs11_manager_t *pkcs11_manager_get();
|
||||
|
||||
#endif /** PKCS11_MANAGER_H_ @}*/
|
||||
|
||||
Reference in New Issue
Block a user