Data object interface

## Files

file | pkcs11h-data.h
| pkcs11-helper data object support.

## Classes

struct | pkcs11h_data_id_list_s
| Data identifier list. More...

## Typedefs

typedef struct pkcs11h_data_id_list_s * | pkcs11h_data_id_list_t
| Data identifier list.

## Functions

CK_RV | pkcs11h_data_get (IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN const char *const application, IN const char *const label, IN void *const user_data, IN const unsigned mask_prompt, OUT unsigned char *const blob, IN OUT size_t *const p_blob_size)
| Get data object.
CK_RV | pkcs11h_data_put (IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN const char *const application, IN const char *const label, IN void *const user_data, IN const unsigned mask_prompt, OUT unsigned char *const blob, IN const size_t blob_size)
| Put data object.
CK_RV | pkcs11h_data_del (IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN const char *const application, IN const char *const label, IN void *const user_data, IN const unsigned mask_prompt)
| Delete data object.
CK_RV | pkcs11h_data_freeDataIdList (IN const pkcs11h_data_id_list_t data_id_list)
| Free data object list.
CK_RV | pkcs11h_data_enumDataObjects (IN const pkcs11h_token_id_t token_id, IN const PKCS11H_BOOL is_public, IN void *const user_data, IN const unsigned mask_prompt, OUT pkcs11h_data_id_list_t *const p_data_id_list)
| Get list of data objects.

## Detailed Description

Data object manipulation.

## Function Documentation

## pkcs11h_data_del()

CK_RV pkcs11h_data_del | ( | IN const pkcs11h_token_id_t | token_id,
|  | IN const PKCS11H_BOOL | is_public,
|  | IN const char *const | application,
|  | IN const char *const | label,
|  | IN void *const | user_data,
|  | IN const unsigned | mask_prompt )

Delete data object.

Parameters

  token_id | Token id object.
  is_public | Object is public.
  application | Object application attribute.
  label | Object label attribute.
  user_data | Optional user data, to be passed to hooks.
  mask_prompt | Allow prompt PKCS11H_PROMPT_MASK.

Returns
  CK_RV.

## pkcs11h_data_enumDataObjects()

CK_RV pkcs11h_data_enumDataObjects | ( | IN const pkcs11h_token_id_t | token_id,
|  | IN const PKCS11H_BOOL | is_public,
|  | IN void *const | user_data,
|  | IN const unsigned | mask_prompt,
|  | OUT pkcs11h_data_id_list_t *const | p_data_id_list )

Get list of data objects.

Parameters

  token_id | Token id object.
  is_public | Get a list of public objects.
  user_data | Optional user data, to be passed to hooks.
  mask_prompt | Allow prompt PKCS11H_PROMPT_MASK.
  p_data_id_list | List location.

See also
  pkcs11h_data_freeDataIdList().

Returns
  CK_RV.

## pkcs11h_data_freeDataIdList()

CK_RV pkcs11h_data_freeDataIdList | ( | IN const pkcs11h_data_id_list_t | data_id_list | ) |

Free data object list.

Parameters

  data_id_list | List to free.

Returns
  CK_RV.

## pkcs11h_data_get()

CK_RV pkcs11h_data_get | ( | IN const pkcs11h_token_id_t | token_id,
|  | IN const PKCS11H_BOOL | is_public,
|  | IN const char *const | application,
|  | IN const char *const | label,
|  | IN void *const | user_data,
|  | IN const unsigned | mask_prompt,
|  | OUT unsigned char *const | blob,
|  | IN OUT size_t *const | p_blob_size )

Get data object.

Parameters

  token_id | Token id object.
  is_public | Object is public.
  application | Object application attribute.
  label | Object label attribute.
  user_data | Optional user data, to be passed to hooks.
  mask_prompt | Allow prompt PKCS11H_PROMPT_MASK.
  blob | Blob, set to NULL to get size.
  p_blob_size | Blob size.

Returns
  CK_RV.

Note
  blob may be NULL to get size.

## pkcs11h_data_put()

CK_RV pkcs11h_data_put | ( | IN const pkcs11h_token_id_t | token_id,
|  | IN const PKCS11H_BOOL | is_public,
|  | IN const char *const | application,
|  | IN const char *const | label,
|  | IN void *const | user_data,
|  | IN const unsigned | mask_prompt,
|  | OUT unsigned char *const | blob,
|  | IN const size_t | blob_size )

Put data object.

Parameters

  token_id | Token id object.
  is_public | Object is public.
  application | Object application attribute.
  label | Object label attribute.
  user_data | Optional user data, to be passed to hooks.
  mask_prompt | Allow prompt PKCS11H_PROMPT_MASK.
  blob | Blob, set to NULL to get size.
  blob_size | Blob size.

Returns
  CK_RV.

pkcs11-helper, Copyright (C) Alon Bar-Lev <alon.barlev@gmail.com> |