pkcs11-helper
|
Files | |
file | pkcs11h-token.h |
pkcs11-helper token interface. | |
Classes | |
struct | pkcs11h_token_id_list_s |
Token identifier list. More... | |
Typedefs | |
typedef struct pkcs11h_token_id_list_s * | pkcs11h_token_id_list_t |
Token identifier list. | |
Functions | |
CK_RV | pkcs11h_token_freeTokenId (IN pkcs11h_token_id_t token_id) |
Free token_id object. More... | |
CK_RV | pkcs11h_token_duplicateTokenId (OUT pkcs11h_token_id_t *const to, IN const pkcs11h_token_id_t from) |
Duplicate token_id object. More... | |
PKCS11H_BOOL | pkcs11h_token_sameTokenId (IN const pkcs11h_token_id_t a, IN const pkcs11h_token_id_t b) |
Returns TRUE if same token id. More... | |
CK_RV | pkcs11h_token_logout (IN const pkcs11h_token_id_t token_id) |
Force logout. More... | |
CK_RV | pkcs11h_token_login (IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL readonly, IN const char *const pin) |
Force login, avoid hooks. More... | |
CK_RV | pkcs11h_token_ensureAccess (IN const pkcs11h_token_id_t token_id, IN void *const user_data, IN const unsigned mask_prompt) |
Ensure token is accessible. More... | |
CK_RV | pkcs11h_token_freeTokenIdList (IN const pkcs11h_token_id_list_t token_id_list) |
Free certificate_id list. More... | |
CK_RV | pkcs11h_token_enumTokenIds (IN const unsigned method, OUT pkcs11h_token_id_list_t *const p_token_id_list) |
Enumerate available tokens. More... | |
CK_RV | pkcs11h_token_serializeTokenId (OUT char *const sz, IN OUT size_t *max, IN const pkcs11h_token_id_t token_id) |
Serialize token_id into string. More... | |
CK_RV | pkcs11h_token_deserializeTokenId (OUT pkcs11h_token_id_t *p_token_id, IN const char *const sz) |
Deserialize token_id from string. More... | |
Token related functions.
CK_RV pkcs11h_token_deserializeTokenId | ( | OUT pkcs11h_token_id_t * | p_token_id, |
IN const char *const | sz | ||
) |
Deserialize token_id from string.
p_token_id | id. |
sz | Input string. |
CK_RV pkcs11h_token_duplicateTokenId | ( | OUT pkcs11h_token_id_t *const | to, |
IN const pkcs11h_token_id_t | from | ||
) |
Duplicate token_id object.
to | Target. |
from | Source. |
CK_RV pkcs11h_token_ensureAccess | ( | IN const pkcs11h_token_id_t | token_id, |
IN void *const | user_data, | ||
IN const unsigned | mask_prompt | ||
) |
Ensure token is accessible.
token_id | Token id object. |
user_data | Optional user data, to be passed to hooks. |
mask_prompt | Allow prompt PKCS11H_PROMPT_MASK. |
CK_RV pkcs11h_token_enumTokenIds | ( | IN const unsigned | method, |
OUT pkcs11h_token_id_list_t *const | p_token_id_list | ||
) |
Enumerate available tokens.
method | Enum method PKCS11H_ENUM_METHOD. |
p_token_id_list | List. |
CK_RV pkcs11h_token_freeTokenId | ( | IN pkcs11h_token_id_t | token_id | ) |
Free token_id object.
token_id | Token reference. |
CK_RV pkcs11h_token_freeTokenIdList | ( | IN const pkcs11h_token_id_list_t | token_id_list | ) |
Free certificate_id list.
token_id_list | List. |
CK_RV pkcs11h_token_login | ( | IN const pkcs11h_token_id_t | token_id, |
IN const PKCS11H_BOOL | readonly, | ||
IN const char *const | pin | ||
) |
Force login, avoid hooks.
token_id | Token to login into. |
readonly | Should session be readonly. |
pin | PIN to login, NULL for protected authentication. |
CK_RV pkcs11h_token_logout | ( | IN const pkcs11h_token_id_t | token_id | ) |
Force logout.
token_id | Token to login into. |
PKCS11H_BOOL pkcs11h_token_sameTokenId | ( | IN const pkcs11h_token_id_t | a, |
IN const pkcs11h_token_id_t | b | ||
) |
Returns TRUE if same token id.
a | a. |
b | b. |
CK_RV pkcs11h_token_serializeTokenId | ( | OUT char *const | sz, |
IN OUT size_t * | max, | ||
IN const pkcs11h_token_id_t | token_id | ||
) |
Serialize token_id into string.
sz | Output string. |
max | Maximum string size. |
token_id | id to serialize |
pkcs11-helper, Copyright (C) Alon Bar-Lev <alon.barlev@gmail.com> | ![]() |