GP11Object

GP11Object

Synopsis

#define             GP11_VENDOR_CODE
#define             CKR_GP11_MODULE_PROBLEM
#define             GP11_ERROR
GQuark              gp11_get_error_quark                (void);
void                gp11_list_unref_free                (GList *reflist);
const gchar*        gp11_message_from_rv                (CK_RV rv);
gchar*              gp11_string_from_chars              (const guchar *data,
                                                         gsize max);
                    GP11Mechanism;
                    GP11Attribute;
#define             GP11_INVALID
void                gp11_attribute_init                 (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         gconstpointer value,
                                                         gsize length);
void                gp11_attribute_init_invalid         (GP11Attribute *attr,
                                                         gulong attr_type);
void                gp11_attribute_init_boolean         (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         gboolean value);
void                gp11_attribute_init_date            (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         const GDate *value);
void                gp11_attribute_init_ulong           (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         gulong value);
void                gp11_attribute_init_string          (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         const gchar *value);
void                gp11_attribute_init_copy            (GP11Attribute *dest,
                                                         const GP11Attribute *src);
GP11Attribute*      gp11_attribute_new                  (gulong attr_type,
                                                         gpointer value,
                                                         gsize length);
GP11Attribute*      gp11_attribute_new_invalid          (gulong attr_type);
GP11Attribute*      gp11_attribute_new_boolean          (gulong attr_type,
                                                         gboolean value);
GP11Attribute*      gp11_attribute_new_date             (gulong attr_type,
                                                         const GDate *value);
GP11Attribute*      gp11_attribute_new_ulong            (gulong attr_type,
                                                         gulong value);
GP11Attribute*      gp11_attribute_new_string           (gulong attr_type,
                                                         const gchar *value);
gboolean            gp11_attribute_is_invalid           (GP11Attribute *attr);
gboolean            gp11_attribute_get_boolean          (GP11Attribute *attr);
gulong              gp11_attribute_get_ulong            (GP11Attribute *attr);
gchar*              gp11_attribute_get_string           (GP11Attribute *attr);
void                gp11_attribute_get_date             (GP11Attribute *attr,
                                                         GDate *value);
GP11Attribute*      gp11_attribute_dup                  (GP11Attribute *attr);
void                gp11_attribute_clear                (GP11Attribute *attr);
void                gp11_attribute_free                 (GP11Attribute *attr);
                    GP11Attributes;
#define             GP11_TYPE_ATTRIBUTES
GType               gp11_attributes_get_boxed_type      (void);
GP11Attributes*     gp11_attributes_new                 (void);
GP11Attributes*     gp11_attributes_newv                (gulong attr_type);
GP11Attribute*      gp11_attributes_at                  (GP11Attributes *attrs,
                                                         guint index);
void                gp11_attributes_add                 (GP11Attributes *attrs,
                                                         GP11Attribute *attr);
void                gp11_attributes_add_data            (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gconstpointer value,
                                                         gsize length);
void                gp11_attributes_add_invalid         (GP11Attributes *attrs,
                                                         gulong attr_type);
void                gp11_attributes_add_boolean         (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gboolean value);
void                gp11_attributes_add_string          (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         const gchar *string);
void                gp11_attributes_add_date            (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         const GDate *date);
void                gp11_attributes_add_ulong           (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gulong value);
GP11Attribute*      gp11_attributes_find                (GP11Attributes *attrs,
                                                         gulong attr_type);
gboolean            gp11_attributes_find_boolean        (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gboolean *value);
gboolean            gp11_attributes_find_ulong          (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gulong *value);
gboolean            gp11_attributes_find_string         (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gchar **value);
gboolean            gp11_attributes_find_date           (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         GDate *value);
gulong              gp11_attributes_count               (GP11Attributes *attrs);
GP11Attributes*     gp11_attributes_ref                 (GP11Attributes *attrs);
void                gp11_attributes_unref               (GP11Attributes *attrs);
                    GP11ModuleInfo;
void                gp11_module_info_free               (GP11ModuleInfo *module_info);
                    GP11Module;
GP11Module*         gp11_module_initialize              (const gchar *path,
                                                         gpointer reserved,
                                                         GError **err);
GP11ModuleInfo*     gp11_module_get_info                (GP11Module *self);
GList*              gp11_module_get_slots               (GP11Module *self,
                                                         gboolean token_present);
                    GP11SlotInfo;
void                gp11_slot_info_free                 (GP11SlotInfo *slot_info);
                    GP11TokenInfo;
void                gp11_token_info_free                (GP11TokenInfo *token_info);
                    GP11MechanismInfo;
void                gp11_mechanism_info_free            (GP11MechanismInfo *mech_info);
typedef             GP11Mechanisms;
#define             gp11_mechanisms_length              (a)
#define             gp11_mechanisms_at                  (a, i)
#define             gp11_mechanisms_free                (a)
#define             GP11_TYPE_SLOT
#define             GP11_SLOT                           (obj)
#define             GP11_SLOT_CLASS                     (klass)
#define             GP11_IS_SLOT                        (obj)
#define             GP11_IS_SLOT_CLASS                  (klass)
#define             GP11_SLOT_GET_CLASS                 (obj)
                    GP11Slot;
GType               gp11_slot_get_type                  (void);
CK_SLOT_ID          gp11_slot_get_handle                (GP11Slot *self);
gint                gp11_slot_get_max_pin_length        (GP11Slot *self);
GP11SlotInfo*       gp11_slot_get_info                  (GP11Slot *self);
GP11TokenInfo*      gp11_slot_get_token_info            (GP11Slot *self);
GP11Mechanisms*     gp11_slot_get_mechanisms            (GP11Slot *self);
GP11MechanismInfo*  gp11_slot_get_mechanism_info        (GP11Slot *self,
                                                         gulong mech_type);
gboolean            gp11_slot_init_token                (GP11Slot *self,
                                                         const guchar *pin,
                                                         gsize length,
                                                         const gchar *label,
                                                         GError **err);
void                gp11_slot_init_token_async          (GP11Slot *self,
                                                         const guchar *pin,
                                                         gsize length,
                                                         const gchar *label,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_slot_init_token_finish         (GP11Slot *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Session*        gp11_slot_open_session              (GP11Slot *self,
                                                         gulong flags,
                                                         GError **err);
GP11Session*        gp11_slot_open_session_full         (GP11Slot *self,
                                                         gulong flags,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_slot_open_session_async        (GP11Slot *self,
                                                         gulong flags,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Session*        gp11_slot_open_session_finish       (GP11Slot *self,
                                                         GAsyncResult *result,
                                                         GError **err);
                    GP11SessionInfo;
void                gp11_session_info_free              (GP11SessionInfo *session_info);
#define             GP11_TYPE_SESSION
#define             GP11_SESSION                        (obj)
#define             GP11_SESSION_CLASS                  (klass)
#define             GP11_IS_SESSION                     (obj)
#define             GP11_IS_SESSION_CLASS               (klass)
#define             GP11_SESSION_GET_CLASS              (obj)
                    GP11Session;
GType               gp11_session_get_type               (void);
GP11Session*        gp11_session_from_handle            (GP11Slot *slot,
                                                         CK_SESSION_HANDLE handle);
CK_SESSION_HANDLE   gp11_session_get_handle             (GP11Session *self);
GP11SessionInfo*    gp11_session_get_info               (GP11Session *self);
gboolean            gp11_session_init_pin               (GP11Session *self,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GError **err);
void                gp11_session_init_pin_async         (GP11Session *self,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_init_pin_finish        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
gboolean            gp11_session_set_pin                (GP11Session *self,
                                                         const guchar *old_pin,
                                                         gsize n_old_pin,
                                                         const guchar *new_pin,
                                                         gsize n_new_pin,
                                                         GError **err);
void                gp11_session_set_pin_async          (GP11Session *self,
                                                         const guchar *old_pin,
                                                         gsize n_old_pin,
                                                         const guchar *new_pin,
                                                         gsize n_new_pin,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_set_pin_finish         (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_get_operation_state    (GP11Session *self,
                                                         gsize *n_result,
                                                         GError **err);
void                gp11_session_get_operation_state_async
                                                        (GP11Session *self,
                                                         gsize *n_result,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_get_operation_state_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
gboolean            gp11_session_set_operation_state    (GP11Session *self,
                                                         const guchar *state,
                                                         gsize n_state,
                                                         GError **err);
void                gp11_session_set_operation_state_async
                                                        (GP11Session *self,
                                                         const guchar *state,
                                                         gsize n_state,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_set_operation_state_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
gboolean            gp11_session_login                  (GP11Session *self,
                                                         gulong user_type,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GError **err);
gboolean            gp11_session_login_full             (GP11Session *self,
                                                         gulong user_type,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_login_async            (GP11Session *self,
                                                         gulong user_type,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_login_finish           (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
gboolean            gp11_session_logout                 (GP11Session *self,
                                                         GError **err);
gboolean            gp11_session_logout_full            (GP11Session *self,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_logout_async           (GP11Session *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_logout_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Object*         gp11_session_create_object          (GP11Session *self,
                                                         GError **err);
void                gp11_session_create_object_async    (GP11Session *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Object*         gp11_session_create_object_finish   (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GList*              gp11_session_find_objects           (GP11Session *self,
                                                         GError **err);
void                gp11_session_find_objects_async     (GP11Session *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GList*              gp11_session_find_objects_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Object*         gp11_session_generate_key           (GP11Session *self,
                                                         GP11Mechanism *mechanism,
                                                         GError **err);
void                gp11_session_seed_random_async      (GP11Session *self,
                                                         const guchar *seed,
                                                         gsize n_seed,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_seed_random_finish     (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_generate_random        (GP11Session *self,
                                                         gsize n_random,
                                                         GError **err);
void                gp11_session_generate_random_async  (GP11Session *self,
                                                         gsize n_random,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_generate_random_finish (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_encrypt                (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_encrypt_full           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_encrypt_async          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_encrypt_finish         (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_encrypt          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_encrypt_async    (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_encrypt_finish   (GP11Session *self,
                                                         GP11Object *key,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_decrypt                (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_decrypt_full           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_decrypt_async          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_decrypt_finish         (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_decrypt          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_decrypt_async    (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_decrypt_finish   (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_digest                 (GP11Session *self,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_digest_full            (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_digest_async           (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_digest_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_digest           (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_digest_async     (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_digest_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_digest_encrypt   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_digest_encrypt_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_digest_encrypt_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_digest_decrypt   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *decrypt_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_digest_decrypt_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *decrypt_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_digest_decrypt_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_decrypt_verify   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *decrypt_mech,
                                                         GP11Mechanism *verify_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_decrypt_verify_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *decrypt_mech,
                                                         GP11Mechanism *verify_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_decrypt_verify_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_sign                   (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_sign_full              (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_sign_async             (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_sign_finish            (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_sign             (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_sign_async       (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_sign_finish      (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Processor*      gp11_session_batch_sign_encrypt     (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *sign_mech,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_sign_encrypt_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *sign_mechanism,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Processor*      gp11_session_batch_sign_encrypt_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_sign_recover           (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_sign_recover_full      (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_sign_recover_async     (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_sign_recover_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
gboolean            gp11_session_verify                 (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         const guchar *signature,
                                                         gsize n_signature,
                                                         GError **err);
gboolean            gp11_session_verify_full            (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         const guchar *signature,
                                                         gsize n_signature,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_verify_async           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mechanism,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         const guchar *signature,
                                                         gsize n_signature,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_session_verify_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GkrProcessor*       gp11_session_batch_verify           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_batch_verify_async     (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GkrProcessor*       gp11_session_batch_verify_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_session_verify_recover         (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_verify_recover_full    (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_session_verify_recover_async   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_verify_recover_finish  (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_session_wrap                   (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         GP11Object *wrapped_key,
                                                         gsize *n_result,
                                                         GError **err);
void                gp11_session_wrap_async             (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GP11Object *wrapped_key,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_session_wrap_finish            (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
GP11Object*         gp11_session_unwrap                 (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GError **err);
GP11Object*         gp11_session_unwrap_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Object*         gp11_session_derive                 (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         GError **err);
GP11Object*         gp11_session_derive_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);
#define             GP11_TYPE_OBJECT
#define             GP11_OBJECT                         (obj)
#define             GP11_OBJECT_CLASS                   (klass)
#define             GP11_IS_OBJECT                      (obj)
#define             GP11_IS_OBJECT_CLASS                (klass)
#define             GP11_OBJECT_GET_CLASS               (obj)
                    GP11Object;
GType               gp11_object_get_type                (void);
GP11Object*         gp11_object_from_handle             (GP11Slot *slot,
                                                         CK_OBJECT_HANDLE handle);
GList*              gp11_objects_from_handle_array      (GP11Slot *slot,
                                                         CK_OBJECT_HANDLE_PTR handles,
                                                         CK_ULONG n_handles);
CK_OBJECT_HANDLE    gp11_object_get_handle              (GP11Object *self);
GP11Object*         gp11_object_copy                    (GP11Object *self,
                                                         GError **err);
GP11Object*         gp11_object_copy_full               (GP11Object *self,
                                                         GP11Attributes *additional,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_object_copy_async              (GP11Object *self,
                                                         GP11Attributes *additional,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Object*         gp11_object_copy_finish             (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);
gboolean            gp11_object_destroy                 (GP11Object *self,
                                                         GError **err);
gboolean            gp11_object_destroy_full            (GP11Object *self,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_object_destroy_async           (GP11Object *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_object_destroy_finish          (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);
gssize              gp11_object_get_size                (GP11Object *self,
                                                         GError **err);
gssize              gp11_object_get_size_full           (GP11Object *self,
                                                         GCancellable *cancellable,
                                                         GError **err);
void                gp11_object_get_size_async          (GP11Object *self,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gssize              gp11_object_get_size_finish         (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);
gboolean            gp11_object_set                     (GP11Object *self,
                                                         GError **err);
void                gp11_object_set_async               (GP11Object *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            gp11_object_set_finish              (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);
GP11Attributes*     gp11_object_get                     (GP11Object *self,
                                                         GError **err);
void                gp11_object_get_async               (GP11Object *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
GP11Attributes*     gp11_object_get_finish              (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);
guchar*             gp11_processor_step                 (GP11Processor *processor,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);
void                gp11_processor_step_async           (GP11Processor *processor,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_processor_step_finish          (GP11Processor *processor,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_processor_close                (GP11Processor *processor,
                                                         gsize *n_result,
                                                         GError **err);
guchar*             gp11_processor_close_async          (GP11Processor *processor,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
guchar*             gp11_processor_close_finish         (GP11Processor *processor,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

Object Hierarchy

  GObject
   +----GP11Module
  GObject
   +----GP11Slot
  GObject
   +----GP11Session
  GObject
   +----GP11Object

Properties

  "auto-authenticate"        gboolean              : Read / Write
  "functions"                gpointer              : Read / Write / Construct Only
  "path"                     gchar*                : Read / Write / Construct Only
  "pool-sessions"            gboolean              : Read / Write
  "handle"                   gulong                : Read / Write / Construct Only
  "module"                   GP11Module*           : Read / Write / Construct Only
  "handle"                   gulong                : Read / Write / Construct Only
  "module"                   GP11Module*           : Read / Write / Construct Only
  "slot"                     GP11Slot*             : Read / Write / Construct Only
  "handle"                   gulong                : Read / Write / Construct Only
  "module"                   GP11Module*           : Read / Write / Construct Only
  "session"                  GP11Session*          : Read / Write
  "slot"                     GP11Slot*             : Read / Write / Construct Only

Signals

  "authenticate-object"                            : Run Last
  "authenticate-slot"                              : Run Last
  "discard-handle"                                 : Run Last

Description

Details

GP11_VENDOR_CODE

#define             GP11_VENDOR_CODE                        0x47503131 /* GP11 */


CKR_GP11_MODULE_PROBLEM

#define             CKR_GP11_MODULE_PROBLEM                 (CKR_VENDOR_DEFINED | (GP11_VENDOR_CODE + 1)) 


GP11_ERROR

#define             GP11_ERROR                              (gp11_get_error_quark ())


gp11_get_error_quark ()

GQuark              gp11_get_error_quark                (void);

The error domain for GP11 library errors.

Returns :

The error domain.

gp11_list_unref_free ()

void                gp11_list_unref_free                (GList *reflist);

Free a list of GObject based pointers. All objects in the list will be unreffed and then the list itself will be freed.

reflist :


gp11_message_from_rv ()

const gchar*        gp11_message_from_rv                (CK_RV rv);

Get a message for a PKCS11 return value or error code. Do not pass CKR_OK or other such non errors to this function.

rv :

Returns :

The user readable message.

gp11_string_from_chars ()

gchar*              gp11_string_from_chars              (const guchar *data,
                                                         gsize max);

data :

max :

Returns :


GP11Mechanism

typedef struct {
	gulong type;
	gpointer parameter;
	gulong n_parameter;
} GP11Mechanism;


GP11Attribute

typedef struct {
	gulong type;
	guchar *value;
	gulong length;
} GP11Attribute;


GP11_INVALID

#define GP11_INVALID -1UL


gp11_attribute_init ()

void                gp11_attribute_init                 (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         gconstpointer value,
                                                         gsize length);

Initialize a PKCS11 attribute. This copies the value memory into an internal buffer.

When done with the attribute you should use gp11_attribute_clear() to free the internal memory.

attr :

An uninitialized attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The raw value of the attribute.

length :

The length of the raw value.

gp11_attribute_init_invalid ()

void                gp11_attribute_init_invalid         (GP11Attribute *attr,
                                                         gulong attr_type);

Initialize a PKCS11 attribute to an 'invalid' or 'not found' state. Specifically this sets the value length to (CK_ULONG)-1 as specified in the PKCS11 specification.

When done with the attribute you should use gp11_attribute_clear() to free the internal memory.

attr :

An uninitialized attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

gp11_attribute_init_boolean ()

void                gp11_attribute_init_boolean         (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         gboolean value);

Initialize a PKCS11 attribute to boolean. This will result in a CK_BBOOL attribute from the PKCS11 specs.

When done with the attribute you should use gp11_attribute_clear() to free the internal memory.

attr :

An uninitialized attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The boolean value of the attribute.

gp11_attribute_init_date ()

void                gp11_attribute_init_date            (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         const GDate *value);

Initialize a PKCS11 attribute to a date. This will result in a CK_DATE attribute from the PKCS11 specs.

When done with the attribute you should use gp11_attribute_clear() to free the internal memory.

attr :

An uninitialized attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The date value of the attribute.

gp11_attribute_init_ulong ()

void                gp11_attribute_init_ulong           (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         gulong value);

Initialize a PKCS11 attribute to a unsigned long. This will result in a CK_ULONG attribute from the PKCS11 specs.

When done with the attribute you should use gp11_attribute_clear() to free the internal memory.

attr :

An uninitialized attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The ulong value of the attribute.

gp11_attribute_init_string ()

void                gp11_attribute_init_string          (GP11Attribute *attr,
                                                         gulong attr_type,
                                                         const gchar *value);

Initialize a PKCS11 attribute to a string. This will result in an attribute containing the text, but not the null terminator. The text in the attribute will be of the same encoding as you pass to this function.

When done with the attribute you should use gp11_attribute_clear() to free the internal memory.

attr :

An uninitialized attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The null terminated string value of the attribute.

gp11_attribute_init_copy ()

void                gp11_attribute_init_copy            (GP11Attribute *dest,
                                                         const GP11Attribute *src);

Initialize a PKCS11 attribute as a copy of another attribute. This copies the value memory as well.

When done with the copied attribute you should use gp11_attribute_clear() to free the internal memory.

dest :

An uninitialized attribute.

src :

An attribute to copy.

gp11_attribute_new ()

GP11Attribute*      gp11_attribute_new                  (gulong attr_type,
                                                         gpointer value,
                                                         gsize length);

Create a new PKCS11 attribute. The value will be copied into the new attribute.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The raw value of the attribute.

length :

The length of the attribute.

Returns :

The new attribute. When done with the attribute use gp11_attribute_free() to free it.

gp11_attribute_new_invalid ()

GP11Attribute*      gp11_attribute_new_invalid          (gulong attr_type);

Create a new PKCS11 attribute as 'invalid' or 'not found' state. Specifically this sets the value length to (CK_ULONG)-1 as specified in the PKCS11 specification.

attr_type :

The PKCS11 attribute type to set on the attribute.

Returns :

The new attribute. When done with the attribute use gp11_attribute_free() to free it.

gp11_attribute_new_boolean ()

GP11Attribute*      gp11_attribute_new_boolean          (gulong attr_type,
                                                         gboolean value);

Initialize a PKCS11 attribute to boolean. This will result in a CK_BBOOL attribute from the PKCS11 specs.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The boolean value of the attribute.

Returns :

The new attribute. When done with the attribute use gp11_attribute_free() to free it.

gp11_attribute_new_date ()

GP11Attribute*      gp11_attribute_new_date             (gulong attr_type,
                                                         const GDate *value);

Initialize a PKCS11 attribute to a date. This will result in a CK_DATE attribute from the PKCS11 specs.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The date value of the attribute.

Returns :

The new attribute. When done with the attribute use gp11_attribute_free() to free it.

gp11_attribute_new_ulong ()

GP11Attribute*      gp11_attribute_new_ulong            (gulong attr_type,
                                                         gulong value);

Initialize a PKCS11 attribute to a unsigned long. This will result in a CK_ULONG attribute from the PKCS11 specs.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The ulong value of the attribute.

Returns :

The new attribute. When done with the attribute use gp11_attribute_free() to free it.

gp11_attribute_new_string ()

GP11Attribute*      gp11_attribute_new_string           (gulong attr_type,
                                                         const gchar *value);

Initialize a PKCS11 attribute to a string. This will result in an attribute containing the text, but not the null terminator. The text in the attribute will be of the same encoding as you pass to this function.

attr_type :

The PKCS11 attribute type to set on the attribute.

value :

The null terminated string value of the attribute.

Returns :

The new attribute. When done with the attribute use gp11_attribute_free() to free it.

gp11_attribute_is_invalid ()

gboolean            gp11_attribute_is_invalid           (GP11Attribute *attr);

Check if the PKCS11 attribute represents 'invalid' or 'not found' according to the PKCS11 spec. That is, having length of (CK_ULONG)-1.

attr :

The attribute to check.

Returns :

Whether the attribute represents invalid or not.

gp11_attribute_get_boolean ()

gboolean            gp11_attribute_get_boolean          (GP11Attribute *attr);

Get the CK_BBOOL of a PKCS11 attribute. No conversion is performed. It is an error to pass an attribute to this function unless you're know it's supposed to contain a boolean value.

attr :

The attribute to retrieve value from.

Returns :

The boolean value of the attribute.

gp11_attribute_get_ulong ()

gulong              gp11_attribute_get_ulong            (GP11Attribute *attr);

Get the CK_ULONG value of a PKCS11 attribute. No conversion is performed. It is an error to pass an attribute to this function unless you're know it's supposed to contain a value of the right type.

attr :

The attribute to retrieve value from.

Returns :

The ulong value of the attribute.

gp11_attribute_get_string ()

gchar*              gp11_attribute_get_string           (GP11Attribute *attr);

Get the string value of a PKCS11 attribute. No conversion is performed. It is an error to pass an attribute to this function unless you're know it's supposed to contain a value of the right type.

attr :

The attribute to retrieve value from.

Returns :

A null terminated string, to be freed with g_free(), or NULL if the value contained a NULL string.

gp11_attribute_get_date ()

void                gp11_attribute_get_date             (GP11Attribute *attr,
                                                         GDate *value);

Get the CK_DATE of a PKCS11 attribute. No conversion is performed. It is an error to pass an attribute to this function unless you're know it's supposed to contain a value of the right type.

attr :

The attribute to retrieve value from.

value :

The date value to fill in with the parsed date.

gp11_attribute_dup ()

GP11Attribute*      gp11_attribute_dup                  (GP11Attribute *attr);

Duplicate the PKCS11 attribute. All value memory is also copied.

attr :

The attribute to duplicate.

Returns :

The duplicated attribute. Use gp11_attribute_free() to free it.

gp11_attribute_clear ()

void                gp11_attribute_clear                (GP11Attribute *attr);

Clear allocated memory held by a statically allocated attribute. These are usually initialized with gp11_attribute_init() or a similar function.

The type of the attribute will remain set.

attr :

Attribute to clear.

gp11_attribute_free ()

void                gp11_attribute_free                 (GP11Attribute *attr);

Free an attribute and its allocated memory. These is usually used with attributes that are allocated by gp11_attribute_new() or a similar function.

attr :

Attribute to free.

GP11Attributes

typedef struct _GP11Attributes GP11Attributes;


GP11_TYPE_ATTRIBUTES

#define             GP11_TYPE_ATTRIBUTES                    (gp11_attributes_get_boxed_type ())


gp11_attributes_get_boxed_type ()

GType               gp11_attributes_get_boxed_type      (void);

Get the boxed type representing a GP11Attributes array.

Returns :

The boxed type.

gp11_attributes_new ()

GP11Attributes*     gp11_attributes_new                 (void);

Create a new GP11Attributes array.

Returns :

The new attributes array. When done with the array release it with gp11_attributes_unref().

gp11_attributes_newv ()

GP11Attributes*     gp11_attributes_newv                (gulong attr_type);

Create a new GP11Attributes array.

The arguments must be triples of: attribute type, data type, value

The variable argument list should contain:

a)

The gulong attribute type (ie: CKA_LABEL).

b)

The attribute data type (one of GP11_BOOLEAN, GP11_ULONG, GP11_STRING, GP11_DATE) orthe raw attribute value length.

c)

The attribute value, either a gboolean, gulong, gchar*, GDate* or a pointer to a raw attribute value.

The variable argument list should be terminated with GP11_INVALID.

attr_type :

Returns :

The new attributes array. When done with the array release it with gp11_attributes_unref().

gp11_attributes_at ()

GP11Attribute*      gp11_attributes_at                  (GP11Attributes *attrs,
                                                         guint index);

Get attribute at the specified index in the attribute array.

Use gp11_attributes_count() to determine how many attributes are in the array.

attrs :

The attributes array.

index :

The attribute index to retrieve.

Returns :

The specified attribute.

gp11_attributes_add ()

void                gp11_attributes_add                 (GP11Attributes *attrs,
                                                         GP11Attribute *attr);

Add the specified attribute to the array.

The value stored in the attribute will be copied.

attrs :

The attributes array to add to

attr :

The attribute to add.

gp11_attributes_add_data ()

void                gp11_attributes_add_data            (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gconstpointer value,
                                                         gsize length);

Add an attribute with the specified type and value to the array.

The value stored in the attribute will be copied.

attrs :

The attributes array to add to.

attr_type :

The type of attribute to add.

value :

The raw memory of the attribute value.

length :

The length of the attribute value.

gp11_attributes_add_invalid ()

void                gp11_attributes_add_invalid         (GP11Attributes *attrs,
                                                         gulong attr_type);

Add an attribute with the specified type and an 'invalid' value to the array.

attrs :

The attributes array to add to.

attr_type :

The type of attribute to add.

gp11_attributes_add_boolean ()

void                gp11_attributes_add_boolean         (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gboolean value);

Add an attribute with the specified type and value to the array.

The value will be stored as a CK_BBOOL PKCS11 style attribute.

attrs :

The attributes array to add to.

attr_type :

The type of attribute to add.

value :

The boolean value to add.

gp11_attributes_add_string ()

void                gp11_attributes_add_string          (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         const gchar *string);

Add an attribute with the specified type and value to the array.

The value will be copied into the attribute.

attrs :

The attributes array to add to.

attr_type :

The type of attribute to add.

string :


gp11_attributes_add_date ()

void                gp11_attributes_add_date            (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         const GDate *date);

Add an attribute with the specified type and value to the array.

The value will be stored as a CK_DATE PKCS11 style attribute.

attrs :

The attributes array to add to.

attr_type :

The type of attribute to add.

date :


gp11_attributes_add_ulong ()

void                gp11_attributes_add_ulong           (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gulong value);

Add an attribute with the specified type and value to the array.

The value will be stored as a CK_ULONG PKCS11 style attribute.

attrs :

The attributes array to add to.

attr_type :

The type of attribute to add.

value :

The gulong value to add.

gp11_attributes_find ()

GP11Attribute*      gp11_attributes_find                (GP11Attributes *attrs,
                                                         gulong attr_type);

Find an attribute with the specified type in the array.

attrs :

The attributes array to search.

attr_type :

The type of attribute to find.

Returns :

The first attribute found with the specified type, or NULL.

gp11_attributes_find_boolean ()

gboolean            gp11_attributes_find_boolean        (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gboolean *value);

Find an attribute with the specified type in the array.

The attribute (if found) must be of the right size to store a boolean value (ie: CK_BBOOL). If the attribute is marked invalid then it will be treated as not found.

attrs :

The attributes array to search.

attr_type :

The type of attribute to find.

value :

The resulting gboolean value.

Returns :

Whether a value was found or not.

gp11_attributes_find_ulong ()

gboolean            gp11_attributes_find_ulong          (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gulong *value);

Find an attribute with the specified type in the array.

The attribute (if found) must be of the right size to store a unsigned long value (ie: CK_ULONG). If the attribute is marked invalid then it will be treated as not found.

attrs :

The attributes array to search.

attr_type :

The type of attribute to find.

value :

The resulting gulong value.

Returns :

Whether a value was found or not.

gp11_attributes_find_string ()

gboolean            gp11_attributes_find_string         (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         gchar **value);

Find an attribute with the specified type in the array.

If the attribute is marked invalid then it will be treated as not found. The resulting string will be null-terminated, and must be freed by the caller using g_free().

attrs :

The attributes array to search.

attr_type :

The type of attribute to find.

value :

The resulting string value.

Returns :

Whether a value was found or not.

gp11_attributes_find_date ()

gboolean            gp11_attributes_find_date           (GP11Attributes *attrs,
                                                         gulong attr_type,
                                                         GDate *value);

Find an attribute with the specified type in the array.

The attribute (if found) must be of the right size to store a date value (ie: CK_DATE). If the attribute is marked invalid then it will be treated as not found.

attrs :

The attributes array to search.

attr_type :

The type of attribute to find.

value :

The resulting GDate value.

Returns :

Whether a value was found or not.

gp11_attributes_count ()

gulong              gp11_attributes_count               (GP11Attributes *attrs);

Get the number of attributes in this attribute array.

attrs :

The attributes array to count.

Returns :

The number of contained attributes.

gp11_attributes_ref ()

GP11Attributes*     gp11_attributes_ref                 (GP11Attributes *attrs);

Reference this attributes array.

attrs :

An attribute array

Returns :


gp11_attributes_unref ()

void                gp11_attributes_unref               (GP11Attributes *attrs);

Unreference this attribute array.

When all outstanding references are NULL, the array will be freed.

attrs :

An attribute array

GP11ModuleInfo

typedef struct {
	guint8 pkcs11_version_major;
	guint8 pkcs11_version_minor;
	
	gchar *manufacturer_id;
	gulong flags;
	
	gchar *library_description;
	guint8 library_version_major;
	guint8 library_version_minor;
} GP11ModuleInfo;


gp11_module_info_free ()

void                gp11_module_info_free               (GP11ModuleInfo *module_info);

Free a GP11ModuleInfo structure.

module_info :

The module info to free, or NULL.

GP11Module

typedef struct _GP11Module GP11Module;


gp11_module_initialize ()

GP11Module*         gp11_module_initialize              (const gchar *path,
                                                         gpointer reserved,
                                                         GError **err);

Load and initialize a PKCS11 module represented by a GP11Module object.

path :

The file system path to the PKCS11 module to load.

reserved :

Extra arguments for the PKCS11 module, should usually be NULL.

err :

A location to store an error resulting from a failed load.

Returns :

The loaded PKCS11 module or NULL if failed.

gp11_module_get_info ()

GP11ModuleInfo*     gp11_module_get_info                (GP11Module *self);

Get the info about a PKCS11 module.

self :

The module to get info for.

Returns :

The module info. Release this with gp11_module_info_free().

gp11_module_get_slots ()

GList*              gp11_module_get_slots               (GP11Module *self,
                                                         gboolean token_present);

Get the GP11Slot objects for a given module.

self :

The module for which to get the slots.

token_present :

Whether to limit only to slots with a token present.

Returns :

The possibly empty list of slots. Release this with gp11_list_unref_free().

GP11SlotInfo

typedef struct {
	gchar *slot_description;
	gchar *manufacturer_id;
	gulong flags;
	guint8 hardware_version_major;
	guint8 hardware_version_minor;
	guint8 firmware_version_major;
	guint8 firmware_version_minor;
} GP11SlotInfo;


gp11_slot_info_free ()

void                gp11_slot_info_free                 (GP11SlotInfo *slot_info);

Free the GP11SlotInfo and associated resources.

slot_info :

The slot info to free, or NULL.

GP11TokenInfo

typedef struct {
	gchar *label;
	gchar *manufacturer_id;
	gchar *model;
	gchar *serial_number;
	gulong flags;
	glong max_session_count;
	glong session_count;
	glong max_rw_session_count;
	glong rw_session_count;
	glong max_pin_len;
	glong min_pin_len;
	glong total_public_memory;
	glong free_public_memory;
	glong total_private_memory;
	glong free_private_memory;
	guint8 hardware_version_major;
	guint8 hardware_version_minor;
	guint8 firmware_version_major;
	guint8 firmware_version_minor;
	gint64 utc_time;
} GP11TokenInfo;


gp11_token_info_free ()

void                gp11_token_info_free                (GP11TokenInfo *token_info);

Free the GP11TokenInfo and associated resources.

token_info :

The token info to free, or NULL.

GP11MechanismInfo

typedef struct {
	gulong min_key_size;
	gulong max_key_size;
	gulong flags;
} GP11MechanismInfo;


gp11_mechanism_info_free ()

void                gp11_mechanism_info_free            (GP11MechanismInfo *mech_info);

Free the GP11MechanismInfo and associated resources.

mech_info :

The mechanism info to free, or NULL.

GP11Mechanisms

typedef GArray GP11Mechanisms;


gp11_mechanisms_length()

#define gp11_mechanisms_length(a)  	((a)->len)

a :


gp11_mechanisms_at()

#define gp11_mechanisms_at(a, i) 	(g_array_index(a, CK_MECHANISM_TYPE, i))

a :

i :


gp11_mechanisms_free()

#define gp11_mechanisms_free(a)         (g_array_free(a, TRUE))

a :


GP11_TYPE_SLOT

#define GP11_TYPE_SLOT             (gp11_slot_get_type())


GP11_SLOT()

#define GP11_SLOT(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GP11_TYPE_SLOT, GP11Slot))

obj :


GP11_SLOT_CLASS()

#define GP11_SLOT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GP11_TYPE_SLOT, GP11Slot))

klass :


GP11_IS_SLOT()

#define GP11_IS_SLOT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GP11_TYPE_SLOT))

obj :


GP11_IS_SLOT_CLASS()

#define GP11_IS_SLOT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GP11_TYPE_SLOT))

klass :


GP11_SLOT_GET_CLASS()

#define GP11_SLOT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GP11_TYPE_SLOT, GP11SlotClass))

obj :


GP11Slot

typedef struct _GP11Slot GP11Slot;


gp11_slot_get_type ()

GType               gp11_slot_get_type                  (void);

Returns :


gp11_slot_get_handle ()

CK_SLOT_ID          gp11_slot_get_handle                (GP11Slot *self);

Get the raw PKCS11 handle of a slot.

self :

The slot to get the handle of.

Returns :

The raw handle.

gp11_slot_get_max_pin_length ()

gint                gp11_slot_get_max_pin_length        (GP11Slot *self);

self :

Returns :


gp11_slot_get_info ()

GP11SlotInfo*       gp11_slot_get_info                  (GP11Slot *self);

Get the information for this slot.

self :

The slot to get info for.

Returns :

The slot information. When done, use gp11_slot_info_free() to release it.

gp11_slot_get_token_info ()

GP11TokenInfo*      gp11_slot_get_token_info            (GP11Slot *self);

Get the token information for this slot.

self :

The slot to get info for.

Returns :

The token information. When done, use gp11_token_info_free() to release it.

gp11_slot_get_mechanisms ()

GP11Mechanisms*     gp11_slot_get_mechanisms            (GP11Slot *self);

Get the available mechanisms for this slot.

self :

The slot to get mechanisms for.

Returns :

A list of the mechanisms for this slot. Use gp11_mechanisms_free() when done with this.

gp11_slot_get_mechanism_info ()

GP11MechanismInfo*  gp11_slot_get_mechanism_info        (GP11Slot *self,
                                                         gulong mech_type);

Get information for the specified mechanism.

self :

The slot to get mechanism info from.

mech_type :

The mechanisms type to get info for.

Returns :

The mechanism information, or NULL if failed. Use gp11_mechanism_info_free() when done with it.

gp11_slot_init_token ()

gboolean            gp11_slot_init_token                (GP11Slot *self,
                                                         const guchar *pin,
                                                         gsize length,
                                                         const gchar *label,
                                                         GError **err);

self :

pin :

length :

label :

err :

Returns :


gp11_slot_init_token_async ()

void                gp11_slot_init_token_async          (GP11Slot *self,
                                                         const guchar *pin,
                                                         gsize length,
                                                         const gchar *label,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

pin :

length :

label :

callback :

user_data :


gp11_slot_init_token_finish ()

gboolean            gp11_slot_init_token_finish         (GP11Slot *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_slot_open_session ()

GP11Session*        gp11_slot_open_session              (GP11Slot *self,
                                                         gulong flags,
                                                         GError **err);

Open a session on the slot. If the 'auto reuse' setting is set, then this may be a recycled session with the same flags.

This call may block for an indefinite period.

self :

The slot ot open a session on.

flags :

The flags to open a session with.

err :

A location to return an error, or NULL.

Returns :

A new session or NULL if an error occurs.

gp11_slot_open_session_full ()

GP11Session*        gp11_slot_open_session_full         (GP11Slot *self,
                                                         gulong flags,
                                                         GCancellable *cancellable,
                                                         GError **err);

Open a session on the slot. If the 'auto reuse' setting is set, then this may be a recycled session with the same flags.

This call may block for an indefinite period.

self :

The slot to open a session on.

flags :

The flags to open a session with.

cancellable :

Optional cancellation object, or NULL.

err :

A location to return an error, or NULL.

Returns :

A new session or NULL if an error occurs.

gp11_slot_open_session_async ()

void                gp11_slot_open_session_async        (GP11Slot *self,
                                                         gulong flags,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Open a session on the slot. If the 'auto reuse' setting is set, then this may be a recycled session with the same flags.

This call will return immediately and complete asynchronously.

self :

The slot to open a session on.

flags :

The flags to open a session with.

cancellable :

Optional cancellation object, or NULL.

callback :

Called when the operation completes.

user_data :

Data to pass to the callback.

gp11_slot_open_session_finish ()

GP11Session*        gp11_slot_open_session_finish       (GP11Slot *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the result of an open session operation. If the 'auto reuse' setting is set, then this may be a recycled session with the same flags.

self :

The slot to open a session on.

result :

The result passed to the callback.

err :

A location to return an error or NULL.

Returns :

The new session or NULL if an error occurs.

GP11SessionInfo

typedef struct {
	gulong slot_id;
	gulong state;
	gulong flags;
	gulong device_error;
} GP11SessionInfo;


gp11_session_info_free ()

void                gp11_session_info_free              (GP11SessionInfo *session_info);

Free the GP11SessionInfo structure and all associated memory.

session_info :

Session info to free.

GP11_TYPE_SESSION

#define GP11_TYPE_SESSION             (gp11_session_get_type())


GP11_SESSION()

#define GP11_SESSION(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GP11_TYPE_SESSION, GP11Session))

obj :


GP11_SESSION_CLASS()

#define GP11_SESSION_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GP11_TYPE_SESSION, GP11Session))

klass :


GP11_IS_SESSION()

#define GP11_IS_SESSION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GP11_TYPE_SESSION))

obj :


GP11_IS_SESSION_CLASS()

#define GP11_IS_SESSION_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GP11_TYPE_SESSION))

klass :


GP11_SESSION_GET_CLASS()

#define GP11_SESSION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GP11_TYPE_SESSION, GP11SessionClass))

obj :


GP11Session

typedef struct _GP11Session GP11Session;


gp11_session_get_type ()

GType               gp11_session_get_type               (void);

Returns :


gp11_session_from_handle ()

GP11Session*        gp11_session_from_handle            (GP11Slot *slot,
                                                         CK_SESSION_HANDLE handle);

Initialize a GP11Session object from a raw PKCS11 session handle. Usually one would use the gp11_slot_open_session() function to create a session.

slot :

The slot which the session belongs to.

handle :

The raw PKCS11 handle of the session.

Returns :

The new GP11Session object.

gp11_session_get_handle ()

CK_SESSION_HANDLE   gp11_session_get_handle             (GP11Session *self);

Get the raw PKCS11 session handle from a GP11Session object.

self :

The session object.

Returns :

The raw session handle.

gp11_session_get_info ()

GP11SessionInfo*    gp11_session_get_info               (GP11Session *self);

Get information about the session.

self :

The session object.

Returns :

The session info. Use the gp11_session_info_free() to release when done.

gp11_session_init_pin ()

gboolean            gp11_session_init_pin               (GP11Session *self,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GError **err);

self :

pin :

n_pin :

err :

Returns :


gp11_session_init_pin_async ()

void                gp11_session_init_pin_async         (GP11Session *self,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

pin :

n_pin :

callback :

user_data :


gp11_session_init_pin_finish ()

gboolean            gp11_session_init_pin_finish        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_set_pin ()

gboolean            gp11_session_set_pin                (GP11Session *self,
                                                         const guchar *old_pin,
                                                         gsize n_old_pin,
                                                         const guchar *new_pin,
                                                         gsize n_new_pin,
                                                         GError **err);

self :

old_pin :

n_old_pin :

new_pin :

n_new_pin :

err :

Returns :


gp11_session_set_pin_async ()

void                gp11_session_set_pin_async          (GP11Session *self,
                                                         const guchar *old_pin,
                                                         gsize n_old_pin,
                                                         const guchar *new_pin,
                                                         gsize n_new_pin,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

old_pin :

n_old_pin :

new_pin :

n_new_pin :

callback :

user_data :


gp11_session_set_pin_finish ()

gboolean            gp11_session_set_pin_finish         (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_get_operation_state ()

guchar*             gp11_session_get_operation_state    (GP11Session *self,
                                                         gsize *n_result,
                                                         GError **err);

self :

n_result :

err :

Returns :


gp11_session_get_operation_state_async ()

void                gp11_session_get_operation_state_async
                                                        (GP11Session *self,
                                                         gsize *n_result,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

n_result :

callback :

user_data :


gp11_session_get_operation_state_finish ()

guchar*             gp11_session_get_operation_state_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_set_operation_state ()

gboolean            gp11_session_set_operation_state    (GP11Session *self,
                                                         const guchar *state,
                                                         gsize n_state,
                                                         GError **err);

self :

state :

n_state :

err :

Returns :


gp11_session_set_operation_state_async ()

void                gp11_session_set_operation_state_async
                                                        (GP11Session *self,
                                                         const guchar *state,
                                                         gsize n_state,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

state :

n_state :

callback :

user_data :


gp11_session_set_operation_state_finish ()

gboolean            gp11_session_set_operation_state_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_login ()

gboolean            gp11_session_login                  (GP11Session *self,
                                                         gulong user_type,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GError **err);

Login the user on the session. This call may block for an indefinite period.

self :

Log into this session.

user_type :

The type of login user.

pin :

The user's PIN, or NULL for protected authentication path.

n_pin :

The length of the PIN.

err :

A location to return an error.

Returns :

Whether successful or not.

gp11_session_login_full ()

gboolean            gp11_session_login_full             (GP11Session *self,
                                                         gulong user_type,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GCancellable *cancellable,
                                                         GError **err);

Login the user on the session. This call may block for an indefinite period.

self :

Log into this session.

user_type :

The type of login user.

pin :

The user's PIN, or NULL for protected authentication path.

n_pin :

The length of the PIN.

cancellable :

Optional cancellation object, or NULL.

err :

A location to return an error.

Returns :

Whether successful or not.

gp11_session_login_async ()

void                gp11_session_login_async            (GP11Session *self,
                                                         gulong user_type,
                                                         const guchar *pin,
                                                         gsize n_pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Login the user on the session. This call will return immediately and completes asynchronously.

self :

Log into this session.

user_type :

The type of login user.

pin :

The user's PIN, or NULL for protected authentication path.

n_pin :

The length of the PIN.

cancellable :

Optional cancellation object, or NULL.

callback :

Called when the operation completes.

user_data :

Data to pass to the callback.

gp11_session_login_finish ()

gboolean            gp11_session_login_finish           (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the result of a login operation.

self :

The session logged into.

result :

The result passed to the callback.

err :

A location to return an error.

Returns :

Whether the operation was successful or not.

gp11_session_logout ()

gboolean            gp11_session_logout                 (GP11Session *self,
                                                         GError **err);

Log out of the session. This call may block for an indefinite period.

self :

Logout of this session.

err :

A location to return an error.

Returns :

Whether the logout was successful or not.

gp11_session_logout_full ()

gboolean            gp11_session_logout_full            (GP11Session *self,
                                                         GCancellable *cancellable,
                                                         GError **err);

Log out of the session. This call may block for an indefinite period.

self :

Logout of this session.

cancellable :

Optional cancellation object, or NULL.

err :

A location to return an error.

Returns :

Whether the logout was successful or not.

gp11_session_logout_async ()

void                gp11_session_logout_async           (GP11Session *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Log out of the session. This call returns immediately and completes asynchronously.

self :

Logout of this session.

cancellable :

Optional cancellation object, or NULL.

callback :

Called when the operation completes.

user_data :

Data to pass to the callback.

gp11_session_logout_finish ()

gboolean            gp11_session_logout_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the result of logging out of a session.

self :

Logout of this session.

result :

The result passed to the callback.

err :

A location to return an error.

Returns :

Whether the logout was successful or not.

gp11_session_create_object ()

GP11Object*         gp11_session_create_object          (GP11Session *self,
                                                         GError **err);

Create a new PKCS11 object. This call may block for an indefinite period.

The arguments must be triples of: attribute type, data type, value

The variable argument list should contain:

a)

The gulong attribute type (ie: CKA_LABEL).

b)

The attribute data type (one of GP11_BOOLEAN, GP11_ULONG, GP11_STRING, GP11_DATE) orthe raw attribute value length.

c)

The attribute value, either a gboolean, gulong, gchar*, GDate* or a pointer to a raw attribute value.

The variable argument list should be terminated with GP11_INVALID.

self :

The session to create the object on.

err :

A location to store an error. ...: The attributes to create the new object with.

Returns :

The newly created object, or NULL if an error occurred.

gp11_session_create_object_async ()

void                gp11_session_create_object_async    (GP11Session *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Create a new PKCS11 object. This call will return immediately and complete asynchronously.

self :

The session to create the object on.

attrs :

The attributes to create the object with.

cancellable :

Optional cancellation object or NULL.

callback :

Called when the operation completes.

user_data :

Data to pass to the callback.

gp11_session_create_object_finish ()

GP11Object*         gp11_session_create_object_finish   (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the result of creating a new PKCS11 object.

self :

The session to create the object on.

result :

The result passed to the callback.

err :

A location to return an error, or NULL.

Returns :

The newly created object or NULL if an error occurred.

gp11_session_find_objects ()

GList*              gp11_session_find_objects           (GP11Session *self,
                                                         GError **err);

Find objects matching the passed attributes. This call may block for an indefinite period.

The arguments must be triples of: attribute type, data type, value

The variable argument list should contain:

a)

The gulong attribute type (ie: CKA_LABEL).

b)

The attribute data type (one of GP11_BOOLEAN, GP11_ULONG, GP11_STRING, GP11_DATE) orthe raw attribute value length.

c)

The attribute value, either a gboolean, gulong, gchar*, GDate* or a pointer to a raw attribute value.

The variable argument list should be terminated with GP11_INVALID.

self :

The session to find objects on.

err :

A location to return an error or NULL. ...: The attributes to match.

Returns :

A list of the matching objects, which may be empty.

gp11_session_find_objects_async ()

void                gp11_session_find_objects_async     (GP11Session *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Find the objects matching the passed attributes. This call will return immediately and complete asynchronously.

self :

The session to find objects on.

attrs :

The attributes to match.

cancellable :

Optional cancellation object or NULL.

callback :

Called when the operation completes.

user_data :

Data to pass to the callback.

gp11_session_find_objects_finish ()

GList*              gp11_session_find_objects_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the result of a find operation.

self :

The session to find objects on.

result :

The attributes to match.

err :

A location to return an error.

Returns :

A list of the matching objects, which may be empty.

gp11_session_generate_key ()

GP11Object*         gp11_session_generate_key           (GP11Session *self,
                                                         GP11Mechanism *mechanism,
                                                         GError **err);

self :

mechanism :

err :

Returns :


gp11_session_seed_random_async ()

void                gp11_session_seed_random_async      (GP11Session *self,
                                                         const guchar *seed,
                                                         gsize n_seed,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

seed :

n_seed :

callback :

user_data :


gp11_session_seed_random_finish ()

gboolean            gp11_session_seed_random_finish     (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_generate_random ()

guchar*             gp11_session_generate_random        (GP11Session *self,
                                                         gsize n_random,
                                                         GError **err);

self :

n_random :

err :

Returns :


gp11_session_generate_random_async ()

void                gp11_session_generate_random_async  (GP11Session *self,
                                                         gsize n_random,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

n_random :

callback :

user_data :


gp11_session_generate_random_finish ()

guchar*             gp11_session_generate_random_finish (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_encrypt ()

guchar*             gp11_session_encrypt                (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

self :

key :

mech :

input :

n_input :

n_result :

err :

Returns :


gp11_session_encrypt_full ()

guchar*             gp11_session_encrypt_full           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_encrypt_async ()

void                gp11_session_encrypt_async          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_encrypt_finish ()

guchar*             gp11_session_encrypt_finish         (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_batch_encrypt ()

GP11Processor*      gp11_session_batch_encrypt          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

cancellable :

err :

Returns :


gp11_session_batch_encrypt_async ()

void                gp11_session_batch_encrypt_async    (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

cancellable :

callback :

user_data :


gp11_session_batch_encrypt_finish ()

GP11Processor*      gp11_session_batch_encrypt_finish   (GP11Session *self,
                                                         GP11Object *key,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

key :

result :

err :

Returns :


gp11_session_decrypt ()

guchar*             gp11_session_decrypt                (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

n_result :

err :

Returns :


gp11_session_decrypt_full ()

guchar*             gp11_session_decrypt_full           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_decrypt_async ()

void                gp11_session_decrypt_async          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_decrypt_finish ()

guchar*             gp11_session_decrypt_finish         (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_batch_decrypt ()

GP11Processor*      gp11_session_batch_decrypt          (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

cancellable :

err :

Returns :


gp11_session_batch_decrypt_async ()

void                gp11_session_batch_decrypt_async    (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

cancellable :

callback :

user_data :


gp11_session_batch_decrypt_finish ()

GP11Processor*      gp11_session_batch_decrypt_finish   (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_digest ()

guchar*             gp11_session_digest                 (GP11Session *self,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

self :

mech_type :

input :

n_input :

n_result :

err :

Returns :


gp11_session_digest_full ()

guchar*             gp11_session_digest_full            (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

mech_args :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_digest_async ()

void                gp11_session_digest_async           (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_digest_finish ()

guchar*             gp11_session_digest_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_batch_digest ()

GP11Processor*      gp11_session_batch_digest           (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

mech_args :

cancellable :

err :

Returns :


gp11_session_batch_digest_async ()

void                gp11_session_batch_digest_async     (GP11Session *self,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

mech_args :

cancellable :

callback :

user_data :


gp11_session_batch_digest_finish ()

GP11Processor*      gp11_session_batch_digest_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_batch_digest_encrypt ()

GP11Processor*      gp11_session_batch_digest_encrypt   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

digest_mech :

encrypt_mech :

cancellable :

err :

Returns :


gp11_session_batch_digest_encrypt_async ()

void                gp11_session_batch_digest_encrypt_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

digest_mech :

encrypt_mech :

cancellable :

callback :

user_data :


gp11_session_batch_digest_encrypt_finish ()

GP11Processor*      gp11_session_batch_digest_encrypt_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_batch_digest_decrypt ()

GP11Processor*      gp11_session_batch_digest_decrypt   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *decrypt_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

digest_mech :

decrypt_mech :

cancellable :

err :

Returns :


gp11_session_batch_digest_decrypt_async ()

void                gp11_session_batch_digest_decrypt_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *digest_mech,
                                                         GP11Mechanism *decrypt_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

digest_mech :

decrypt_mech :

cancellable :

callback :

user_data :


gp11_session_batch_digest_decrypt_finish ()

GP11Processor*      gp11_session_batch_digest_decrypt_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_batch_decrypt_verify ()

GP11Processor*      gp11_session_batch_decrypt_verify   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *decrypt_mech,
                                                         GP11Mechanism *verify_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

decrypt_mech :

verify_mech :

cancellable :

err :

Returns :


gp11_session_batch_decrypt_verify_async ()

void                gp11_session_batch_decrypt_verify_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *decrypt_mech,
                                                         GP11Mechanism *verify_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

decrypt_mech :

verify_mech :

cancellable :

callback :

user_data :


gp11_session_batch_decrypt_verify_finish ()

GP11Processor*      gp11_session_batch_decrypt_verify_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_sign ()

guchar*             gp11_session_sign                   (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

n_result :

err :

Returns :


gp11_session_sign_full ()

guchar*             gp11_session_sign_full              (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_sign_async ()

void                gp11_session_sign_async             (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_sign_finish ()

guchar*             gp11_session_sign_finish            (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_batch_sign ()

GP11Processor*      gp11_session_batch_sign             (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

cancellable :

err :

Returns :


gp11_session_batch_sign_async ()

void                gp11_session_batch_sign_async       (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

cancellable :

callback :

user_data :


gp11_session_batch_sign_finish ()

GP11Processor*      gp11_session_batch_sign_finish      (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_batch_sign_encrypt ()

GP11Processor*      gp11_session_batch_sign_encrypt     (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *sign_mech,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

sign_mech :

encrypt_mech :

cancellable :

err :

Returns :


gp11_session_batch_sign_encrypt_async ()

void                gp11_session_batch_sign_encrypt_async
                                                        (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *sign_mechanism,
                                                         GP11Mechanism *encrypt_mech,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

sign_mechanism :

encrypt_mech :

cancellable :

callback :

user_data :


gp11_session_batch_sign_encrypt_finish ()

GP11Processor*      gp11_session_batch_sign_encrypt_finish
                                                        (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_sign_recover ()

guchar*             gp11_session_sign_recover           (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

n_result :

err :

Returns :


gp11_session_sign_recover_full ()

guchar*             gp11_session_sign_recover_full      (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_sign_recover_async ()

void                gp11_session_sign_recover_async     (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_sign_recover_finish ()

guchar*             gp11_session_sign_recover_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_verify ()

gboolean            gp11_session_verify                 (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         const guchar *signature,
                                                         gsize n_signature,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

signature :

n_signature :

err :

Returns :


gp11_session_verify_full ()

gboolean            gp11_session_verify_full            (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         const guchar *signature,
                                                         gsize n_signature,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

input :

n_input :

signature :

n_signature :

cancellable :

err :

Returns :


gp11_session_verify_async ()

void                gp11_session_verify_async           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mechanism,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         const guchar *signature,
                                                         gsize n_signature,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mechanism :

input :

n_input :

signature :

n_signature :

cancellable :

callback :

user_data :


gp11_session_verify_finish ()

gboolean            gp11_session_verify_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_batch_verify ()

GkrProcessor*       gp11_session_batch_verify           (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_batch_verify_async ()

void                gp11_session_batch_verify_async     (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_batch_verify_finish ()

GkrProcessor*       gp11_session_batch_verify_finish    (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_verify_recover ()

guchar*             gp11_session_verify_recover         (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

n_result :

err :

Returns :


gp11_session_verify_recover_full ()

guchar*             gp11_session_verify_recover_full    (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

key :

mech_args :

input :

n_input :

n_result :

cancellable :

err :

Returns :


gp11_session_verify_recover_async ()

void                gp11_session_verify_recover_async   (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

input :

n_input :

cancellable :

callback :

user_data :


gp11_session_verify_recover_finish ()

guchar*             gp11_session_verify_recover_finish  (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_wrap ()

guchar*             gp11_session_wrap                   (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         GP11Object *wrapped_key,
                                                         gsize *n_result,
                                                         GError **err);

self :

key :

mech_type :

wrapped_key :

n_result :

err :

Returns :


gp11_session_wrap_async ()

void                gp11_session_wrap_async             (GP11Session *self,
                                                         GP11Object *key,
                                                         GP11Mechanism *mech_args,
                                                         GP11Object *wrapped_key,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

key :

mech_args :

wrapped_key :

cancellable :

callback :

user_data :


gp11_session_wrap_finish ()

guchar*             gp11_session_wrap_finish            (GP11Session *self,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

self :

result :

n_result :

err :

Returns :


gp11_session_unwrap ()

GP11Object*         gp11_session_unwrap                 (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GError **err);

self :

key :

mech_type :

input :

n_input :

err :

Returns :


gp11_session_unwrap_finish ()

GP11Object*         gp11_session_unwrap_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_session_derive ()

GP11Object*         gp11_session_derive                 (GP11Session *self,
                                                         GP11Object *key,
                                                         gulong mech_type,
                                                         GError **err);

self :

key :

mech_type :

err :

Returns :


gp11_session_derive_finish ()

GP11Object*         gp11_session_derive_finish          (GP11Session *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


GP11_TYPE_OBJECT

#define GP11_TYPE_OBJECT             (gp11_object_get_type())


GP11_OBJECT()

#define GP11_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GP11_TYPE_OBJECT, GP11Object))

obj :


GP11_OBJECT_CLASS()

#define GP11_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GP11_TYPE_OBJECT, GP11Object))

klass :


GP11_IS_OBJECT()

#define GP11_IS_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GP11_TYPE_OBJECT))

obj :


GP11_IS_OBJECT_CLASS()

#define GP11_IS_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GP11_TYPE_OBJECT))

klass :


GP11_OBJECT_GET_CLASS()

#define GP11_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GP11_TYPE_OBJECT, GP11ObjectClass))

obj :


GP11Object

typedef struct _GP11Object GP11Object;


gp11_object_get_type ()

GType               gp11_object_get_type                (void);

Returns :


gp11_object_from_handle ()

GP11Object*         gp11_object_from_handle             (GP11Slot *slot,
                                                         CK_OBJECT_HANDLE handle);

Initialize a GP11Object from a raw PKCS11 handle. Normally you would use gp11_session_create_object() or gp11_session_find_objects() to access objects.

slot :

The slot on which this object is present.

handle :

The raw handle of the object.

Returns :

The new GP11Object. You should use g_object_unref() when done with this object.

gp11_objects_from_handle_array ()

GList*              gp11_objects_from_handle_array      (GP11Slot *slot,
                                                         CK_OBJECT_HANDLE_PTR handles,
                                                         CK_ULONG n_handles);

Initialize a list of GP11Object from raw PKCS11 handles. The handles argument must contain contiguous CK_OBJECT_HANDLE handles in an array.

slot :

The slot on which these objects are present.

handles :

The raw object handles.

n_handles :

The number of raw object handles.

Returns :

The list of GP11Object. You should use gp11_list_unref_free() when done with this list.

gp11_object_get_handle ()

CK_OBJECT_HANDLE    gp11_object_get_handle              (GP11Object *self);

Get the raw PKCS11 handle of a GP11Object.

self :

The object.

Returns :

The raw object handle.

gp11_object_copy ()

GP11Object*         gp11_object_copy                    (GP11Object *self,
                                                         GError **err);

self :

err :

Returns :


gp11_object_copy_full ()

GP11Object*         gp11_object_copy_full               (GP11Object *self,
                                                         GP11Attributes *additional,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

additional :

cancellable :

err :

Returns :


gp11_object_copy_async ()

void                gp11_object_copy_async              (GP11Object *self,
                                                         GP11Attributes *additional,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

additional :

cancellable :

callback :

user_data :


gp11_object_copy_finish ()

GP11Object*         gp11_object_copy_finish             (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_object_destroy ()

gboolean            gp11_object_destroy                 (GP11Object *self,
                                                         GError **err);

Destroy a PKCS11 object, deleting it from storage or the session. This call may block for an indefinite period.

self :

The object to destroy.

err :

A location to return an error.

Returns :

Whether the call was successful or not.

gp11_object_destroy_full ()

gboolean            gp11_object_destroy_full            (GP11Object *self,
                                                         GCancellable *cancellable,
                                                         GError **err);

Destroy a PKCS11 object, deleting it from storage or the session. This call may block for an indefinite period.

self :

The object to destroy.

cancellable :

Optional cancellable object, or NULL to ignore.

err :

A location to return an error.

Returns :

Whether the call was successful or not.

gp11_object_destroy_async ()

void                gp11_object_destroy_async           (GP11Object *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Destroy a PKCS11 object, deleting it from storage or the session. This call will return immediately and complete asynchronously.

self :

The object to destroy.

cancellable :

Optional cancellable object, or NULL to ignore.

callback :

Callback which is called when operation completes.

user_data :

Data to pass to the callback.

gp11_object_destroy_finish ()

gboolean            gp11_object_destroy_finish          (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the status of the operation to destroy a PKCS11 object, begun with gp11_object_destroy_async().

self :

The object being destroyed.

result :

The result of the destory operation passed to the callback.

err :

A location to store an error.

Returns :

Whether the object was destroyed successfully or not.

gp11_object_get_size ()

gssize              gp11_object_get_size                (GP11Object *self,
                                                         GError **err);

self :

err :

Returns :


gp11_object_get_size_full ()

gssize              gp11_object_get_size_full           (GP11Object *self,
                                                         GCancellable *cancellable,
                                                         GError **err);

self :

cancellable :

err :

Returns :


gp11_object_get_size_async ()

void                gp11_object_get_size_async          (GP11Object *self,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

callback :

user_data :


gp11_object_get_size_finish ()

gssize              gp11_object_get_size_finish         (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);

self :

result :

err :

Returns :


gp11_object_set ()

gboolean            gp11_object_set                     (GP11Object *self,
                                                         GError **err);

Set PKCS11 attributes on an object. This call may block for an indefinite period.

The arguments must be triples of: attribute type, data type, value

The variable argument list should contain:

a)

The gulong attribute type (ie: CKA_LABEL).

b)

The attribute data type (one of GP11_BOOLEAN, GP11_ULONG, GP11_STRING, GP11_DATE) orthe raw attribute value length.

c)

The attribute value, either a gboolean, gulong, gchar*, GDate* or a pointer to a raw attribute value.

The variable argument list should be terminated with GP11_INVALID.

self :

The object to set attributes on.

err :

A location to return an error. ...: The attributes to set.

Returns :

Whether the call was successful or not.

gp11_object_set_async ()

void                gp11_object_set_async               (GP11Object *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Set PKCS11 attributes on an object. This call will return immediately and completes asynchronously.

self :

The object to set attributes on.

attrs :

The attributes to set on the object.

cancellable :

Optional cancellable object, or NULL to ignore.

callback :

Callback which is called when operation completes.

user_data :

Data to pass to the callback.

gp11_object_set_finish ()

gboolean            gp11_object_set_finish              (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the status of the operation to set attributes on a PKCS11 object, begun with gp11_object_set_async().

self :

The object to set attributes on.

result :

The result of the destory operation passed to the callback.

err :

A location to store an error.

Returns :

Whether the attributes were successfully set on the object or not.

gp11_object_get ()

GP11Attributes*     gp11_object_get                     (GP11Object *self,
                                                         GError **err);

Get the specified attributes from the object. This call may block for an indefinite period.

No extra references are added to the returned attributes pointer. During this call you may not access the attributes in any way.

self :

The object to get attributes from.

err :

A location to store an error.

Returns :

A pointer to the filled in attributes if successful, or NULL if not.

gp11_object_get_async ()

void                gp11_object_get_async               (GP11Object *self,
                                                         GP11Attributes *attrs,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Get the specified attributes from the object. The attributes will be cleared of their current values, and new attributes will be stored. The attributes should not be accessed in any way except for referencing and unreferencing them until gp11_object_get_finish() is called.

This call returns immediately and completes asynchronously.

self :

The object to get attributes from.

attrs :

The attributes to get, initialized with their types.

cancellable :

Optional cancellation object, or NULL.

callback :

A callback which is called when the operation completes.

user_data :

Data to be passed to the callback.

gp11_object_get_finish ()

GP11Attributes*     gp11_object_get_finish              (GP11Object *self,
                                                         GAsyncResult *result,
                                                         GError **err);

Get the result of a get operation and return specified attributes from the object.

No extra references are added to the returned attributes pointer.

self :

The object to get attributes from.

result :

The result passed to the callback.

err :

A location to store an error.

Returns :

The filled in attributes structure if successful or NULL if not successful.

gp11_processor_step ()

guchar*             gp11_processor_step                 (GP11Processor *processor,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         gsize *n_result,
                                                         GError **err);

processor :

input :

n_input :

n_result :

err :

Returns :


gp11_processor_step_async ()

void                gp11_processor_step_async           (GP11Processor *processor,
                                                         const guchar *input,
                                                         gsize n_input,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

processor :

input :

n_input :

callback :

user_data :


gp11_processor_step_finish ()

guchar*             gp11_processor_step_finish          (GP11Processor *processor,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

processor :

result :

n_result :

err :

Returns :


gp11_processor_close ()

guchar*             gp11_processor_close                (GP11Processor *processor,
                                                         gsize *n_result,
                                                         GError **err);

processor :

n_result :

err :

Returns :


gp11_processor_close_async ()

guchar*             gp11_processor_close_async          (GP11Processor *processor,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

processor :

callback :

user_data :

Returns :


gp11_processor_close_finish ()

guchar*             gp11_processor_close_finish         (GP11Processor *processor,
                                                         GAsyncResult *result,
                                                         gsize *n_result,
                                                         GError **err);

processor :

result :

n_result :

err :

Returns :

Property Details

The "auto-authenticate" property

  "auto-authenticate"        gboolean              : Read / Write

Auto Login to Token when necessary.

Default value: FALSE


The "functions" property

  "functions"                gpointer              : Read / Write / Construct Only

PKCS11 Function List.


The "path" property

  "path"                     gchar*                : Read / Write / Construct Only

Path to the PKCS11 Module.

Default value: NULL


The "pool-sessions" property

  "pool-sessions"            gboolean              : Read / Write

Pool sessions?.

Default value: FALSE


The "handle" property

  "handle"                   gulong                : Read / Write / Construct Only

PKCS11 Slot ID.


The "module" property

  "module"                   GP11Module*           : Read / Write / Construct Only

PKCS11 Module.


The "handle" property

  "handle"                   gulong                : Read / Write / Construct Only

PKCS11 Session Handle.


The "module" property

  "module"                   GP11Module*           : Read / Write / Construct Only

PKCS11 Module.


The "slot" property

  "slot"                     GP11Slot*             : Read / Write / Construct Only

PKCS11 Slot.


The "handle" property

  "handle"                   gulong                : Read / Write / Construct Only

PKCS11 Object Handle.


The "module" property

  "module"                   GP11Module*           : Read / Write / Construct Only

PKCS11 Module.


The "session" property

  "session"                  GP11Session*          : Read / Write

PKCS11 Session to make calls on.


The "slot" property

  "slot"                     GP11Slot*             : Read / Write / Construct Only

PKCS11 Slot.

Signal Details

The "authenticate-object" signal

gboolean            user_function                      (GP11Module *gp11module,
                                                        GP11Object *arg1,
                                                        gchar      *arg2,
                                                        gpointer    arg3,
                                                        gpointer    user_data)       : Run Last

gp11module :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.

Returns :


The "authenticate-slot" signal

gboolean            user_function                      (GP11Module *gp11module,
                                                        GP11Slot   *arg1,
                                                        gchar      *arg2,
                                                        gpointer    arg3,
                                                        gpointer    user_data)       : Run Last

gp11module :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.

Returns :


The "discard-handle" signal

gboolean            user_function                      (GP11Session *gp11session,
                                                        gulong       arg1,
                                                        gpointer     user_data)        : Run Last

gp11session :

the object which received the signal.

Param2 :

user_data :

user data set when the signal handler was connected.

Returns :