diff options
Diffstat (limited to 'lib/pakchois/pakchois.h')
-rw-r--r-- | lib/pakchois/pakchois.h | 328 |
1 files changed, 164 insertions, 164 deletions
diff --git a/lib/pakchois/pakchois.h b/lib/pakchois/pakchois.h index e4b67b2577..a7f8069fcd 100644 --- a/lib/pakchois/pakchois.h +++ b/lib/pakchois/pakchois.h @@ -72,7 +72,7 @@ ck_rv_t pakchois_module_load (pakchois_module_t ** module, const char *name); * multiple times within an application; the underlying PKCS#11 provider will * be loaded only once. */ ck_rv_t pakchois_module_load_abs (pakchois_module_t ** module, - const char *name); + const char *name); /* Load an NSS "softokn" which violates the PKCS#11 standard in * initialization, with given name (e.g. "softokn3"). The directory @@ -80,18 +80,18 @@ ck_rv_t pakchois_module_load_abs (pakchois_module_t ** module, * arguments may be NULL to use defaults. Returns CKR_OK on * success. */ ck_rv_t pakchois_module_nssload (pakchois_module_t ** module, - const char *name, - const char *directory, - const char *cert_prefix, - const char *key_prefix, - const char *secmod_db); + const char *name, + const char *directory, + const char *cert_prefix, + const char *key_prefix, + const char *secmod_db); ck_rv_t pakchois_module_nssload_abs (pakchois_module_t ** module, - const char *name, - const char *directory, - const char *cert_prefix, - const char *key_prefix, - const char *secmod_db); + const char *name, + const char *directory, + const char *cert_prefix, + const char *key_prefix, + const char *secmod_db); /* Destroy a PKCS#11 module. */ void pakchois_module_destroy (pakchois_module_t * module); @@ -135,244 +135,244 @@ const char *pakchois_error (ck_rv_t rv); ck_rv_t pakchois_get_info (pakchois_module_t * module, struct ck_info *info); ck_rv_t pakchois_get_slot_list (pakchois_module_t * module, - unsigned char token_present, - ck_slot_id_t * slot_list, - unsigned long *count); + unsigned char token_present, + ck_slot_id_t * slot_list, + unsigned long *count); ck_rv_t pakchois_get_slot_info (pakchois_module_t * module, - ck_slot_id_t slot_id, - struct ck_slot_info *info); + ck_slot_id_t slot_id, + struct ck_slot_info *info); ck_rv_t pakchois_get_token_info (pakchois_module_t * module, - ck_slot_id_t slot_id, - struct ck_token_info *info); + ck_slot_id_t slot_id, + struct ck_token_info *info); ck_rv_t pakchois_wait_for_slot_event (pakchois_module_t * module, - ck_flags_t flags, ck_slot_id_t * slot, - void *reserved); + ck_flags_t flags, ck_slot_id_t * slot, + void *reserved); ck_rv_t pakchois_get_mechanism_list (pakchois_module_t * module, - ck_slot_id_t slot_id, - ck_mechanism_type_t * mechanism_list, - unsigned long *count); + ck_slot_id_t slot_id, + ck_mechanism_type_t * mechanism_list, + unsigned long *count); ck_rv_t pakchois_get_mechanism_info (pakchois_module_t * module, - ck_slot_id_t slot_id, - ck_mechanism_type_t type, - struct ck_mechanism_info *info); + ck_slot_id_t slot_id, + ck_mechanism_type_t type, + struct ck_mechanism_info *info); ck_rv_t pakchois_init_token (pakchois_module_t * module, - ck_slot_id_t slot_id, unsigned char *pin, - unsigned long pin_len, unsigned char *label); + ck_slot_id_t slot_id, unsigned char *pin, + unsigned long pin_len, unsigned char *label); ck_rv_t pakchois_init_pin (pakchois_session_t * session, unsigned char *pin, - unsigned long pin_len); + unsigned long pin_len); ck_rv_t pakchois_set_pin (pakchois_session_t * session, - unsigned char *old_pin, unsigned long old_len, - unsigned char *new_pin, unsigned long new_len); + unsigned char *old_pin, unsigned long old_len, + unsigned char *new_pin, unsigned long new_len); typedef ck_rv_t (*pakchois_notify_t) (pakchois_session_t * sess, - ck_notification_t event, - void *application); + ck_notification_t event, + void *application); ck_rv_t pakchois_open_session (pakchois_module_t * module, - ck_slot_id_t slot_id, ck_flags_t flags, - void *application, pakchois_notify_t notify, - pakchois_session_t ** session); + ck_slot_id_t slot_id, ck_flags_t flags, + void *application, pakchois_notify_t notify, + pakchois_session_t ** session); ck_rv_t pakchois_close_session (pakchois_session_t * session); ck_rv_t pakchois_close_all_sessions (pakchois_module_t * module, - ck_slot_id_t slot_id); + ck_slot_id_t slot_id); ck_rv_t pakchois_get_session_info (pakchois_session_t * session, - struct ck_session_info *info); + struct ck_session_info *info); ck_rv_t pakchois_get_operation_state (pakchois_session_t * session, - unsigned char *operation_state, - unsigned long *operation_state_len); + unsigned char *operation_state, + unsigned long *operation_state_len); ck_rv_t pakchois_set_operation_state (pakchois_session_t * session, - unsigned char *operation_state, - unsigned long operation_state_len, - ck_object_handle_t encryption_key, - ck_object_handle_t authentiation_key); + unsigned char *operation_state, + unsigned long operation_state_len, + ck_object_handle_t encryption_key, + ck_object_handle_t authentiation_key); ck_rv_t pakchois_login (pakchois_session_t * session, - ck_user_type_t user_type, unsigned char *pin, - unsigned long pin_len); + ck_user_type_t user_type, unsigned char *pin, + unsigned long pin_len); ck_rv_t pakchois_logout (pakchois_session_t * session); ck_rv_t pakchois_create_object (pakchois_session_t * session, - struct ck_attribute *templ, - unsigned long count, - ck_object_handle_t * object); + struct ck_attribute *templ, + unsigned long count, + ck_object_handle_t * object); ck_rv_t pakchois_copy_object (pakchois_session_t * session, - ck_object_handle_t object, - struct ck_attribute *templ, unsigned long count, - ck_object_handle_t * new_object); + ck_object_handle_t object, + struct ck_attribute *templ, unsigned long count, + ck_object_handle_t * new_object); ck_rv_t pakchois_destroy_object (pakchois_session_t * session, - ck_object_handle_t object); + ck_object_handle_t object); ck_rv_t pakchois_get_object_size (pakchois_session_t * session, - ck_object_handle_t object, - unsigned long *size); + ck_object_handle_t object, + unsigned long *size); ck_rv_t pakchois_get_attribute_value (pakchois_session_t * session, - ck_object_handle_t object, - struct ck_attribute *templ, - unsigned long count); + ck_object_handle_t object, + struct ck_attribute *templ, + unsigned long count); ck_rv_t pakchois_set_attribute_value (pakchois_session_t * session, - ck_object_handle_t object, - struct ck_attribute *templ, - unsigned long count); + ck_object_handle_t object, + struct ck_attribute *templ, + unsigned long count); ck_rv_t pakchois_find_objects_init (pakchois_session_t * session, - struct ck_attribute *templ, - unsigned long count); + struct ck_attribute *templ, + unsigned long count); ck_rv_t pakchois_find_objects (pakchois_session_t * session, - ck_object_handle_t * object, - unsigned long max_object_count, - unsigned long *object_count); + ck_object_handle_t * object, + unsigned long max_object_count, + unsigned long *object_count); ck_rv_t pakchois_find_objects_final (pakchois_session_t * session); ck_rv_t pakchois_encrypt_init (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t key); + struct ck_mechanism *mechanism, + ck_object_handle_t key); ck_rv_t pakchois_encrypt (pakchois_session_t * session, - unsigned char *data, unsigned long data_len, - unsigned char *encrypted_data, - unsigned long *encrypted_data_len); + unsigned char *data, unsigned long data_len, + unsigned char *encrypted_data, + unsigned long *encrypted_data_len); ck_rv_t pakchois_encrypt_update (pakchois_session_t * session, - unsigned char *part, unsigned long part_len, - unsigned char *encrypted_part, - unsigned long *encrypted_part_len); + unsigned char *part, unsigned long part_len, + unsigned char *encrypted_part, + unsigned long *encrypted_part_len); ck_rv_t pakchois_encrypt_final (pakchois_session_t * session, - unsigned char *last_encrypted_part, - unsigned long *last_encrypted_part_len); + unsigned char *last_encrypted_part, + unsigned long *last_encrypted_part_len); ck_rv_t pakchois_decrypt_init (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t key); + struct ck_mechanism *mechanism, + ck_object_handle_t key); ck_rv_t pakchois_decrypt (pakchois_session_t * session, - unsigned char *encrypted_data, - unsigned long encrypted_data_len, - unsigned char *data, unsigned long *data_len); + unsigned char *encrypted_data, + unsigned long encrypted_data_len, + unsigned char *data, unsigned long *data_len); ck_rv_t pakchois_decrypt_update (pakchois_session_t * session, - unsigned char *encrypted_part, - unsigned long encrypted_part_len, - unsigned char *part, - unsigned long *part_len); + unsigned char *encrypted_part, + unsigned long encrypted_part_len, + unsigned char *part, + unsigned long *part_len); ck_rv_t pakchois_decrypt_final (pakchois_session_t * session, - unsigned char *last_part, - unsigned long *last_part_len); + unsigned char *last_part, + unsigned long *last_part_len); ck_rv_t pakchois_digest_init (pakchois_session_t * session, - struct ck_mechanism *mechanism); + struct ck_mechanism *mechanism); ck_rv_t pakchois_digest (pakchois_session_t * session, unsigned char *data, - unsigned long data_len, unsigned char *digest, - unsigned long *digest_len); + unsigned long data_len, unsigned char *digest, + unsigned long *digest_len); ck_rv_t pakchois_digest_update (pakchois_session_t * session, - unsigned char *part, unsigned long part_len); + unsigned char *part, unsigned long part_len); ck_rv_t pakchois_digest_key (pakchois_session_t * session, - ck_object_handle_t key); + ck_object_handle_t key); ck_rv_t pakchois_digest_final (pakchois_session_t * session, - unsigned char *digest, - unsigned long *digest_len); + unsigned char *digest, + unsigned long *digest_len); ck_rv_t pakchois_sign_init (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t key); + struct ck_mechanism *mechanism, + ck_object_handle_t key); ck_rv_t pakchois_sign (pakchois_session_t * session, unsigned char *data, - unsigned long data_len, unsigned char *signature, - unsigned long *signature_len); + unsigned long data_len, unsigned char *signature, + unsigned long *signature_len); ck_rv_t pakchois_sign_update (pakchois_session_t * session, - unsigned char *part, unsigned long part_len); + unsigned char *part, unsigned long part_len); ck_rv_t pakchois_sign_final (pakchois_session_t * session, - unsigned char *signature, - unsigned long *signature_len); + unsigned char *signature, + unsigned long *signature_len); ck_rv_t pakchois_sign_recover_init (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t key); + struct ck_mechanism *mechanism, + ck_object_handle_t key); ck_rv_t pakchois_sign_recover (pakchois_session_t * session, - unsigned char *data, unsigned long data_len, - unsigned char *signature, - unsigned long *signature_len); + unsigned char *data, unsigned long data_len, + unsigned char *signature, + unsigned long *signature_len); ck_rv_t pakchois_verify_init (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t key); + struct ck_mechanism *mechanism, + ck_object_handle_t key); ck_rv_t pakchois_verify (pakchois_session_t * session, unsigned char *data, - unsigned long data_len, unsigned char *signature, - unsigned long signature_len); + unsigned long data_len, unsigned char *signature, + unsigned long signature_len); ck_rv_t pakchois_verify_update (pakchois_session_t * session, - unsigned char *part, unsigned long part_len); + unsigned char *part, unsigned long part_len); ck_rv_t pakchois_verify_final (pakchois_session_t * session, - unsigned char *signature, - unsigned long signature_len); + unsigned char *signature, + unsigned long signature_len); ck_rv_t pakchois_verify_recover_init (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t key); + struct ck_mechanism *mechanism, + ck_object_handle_t key); ck_rv_t pakchois_verify_recover (pakchois_session_t * session, - unsigned char *signature, - unsigned long signature_len, - unsigned char *data, - unsigned long *data_len); + unsigned char *signature, + unsigned long signature_len, + unsigned char *data, + unsigned long *data_len); ck_rv_t pakchois_digest_encrypt_update (pakchois_session_t * session, - unsigned char *part, - unsigned long part_len, - unsigned char *encrypted_part, - unsigned long *encrypted_part_len); + unsigned char *part, + unsigned long part_len, + unsigned char *encrypted_part, + unsigned long *encrypted_part_len); ck_rv_t pakchois_decrypt_digest_update (pakchois_session_t * session, - unsigned char *encrypted_part, - unsigned long encrypted_part_len, - unsigned char *part, - unsigned long *part_len); + unsigned char *encrypted_part, + unsigned long encrypted_part_len, + unsigned char *part, + unsigned long *part_len); ck_rv_t pakchois_sign_encrypt_update (pakchois_session_t * session, - unsigned char *part, - unsigned long part_len, - unsigned char *encrypted_part, - unsigned long *encrypted_part_len); + unsigned char *part, + unsigned long part_len, + unsigned char *encrypted_part, + unsigned long *encrypted_part_len); ck_rv_t pakchois_decrypt_verify_update (pakchois_session_t * session, - unsigned char *encrypted_part, - unsigned long encrypted_part_len, - unsigned char *part, - unsigned long *part_len); + unsigned char *encrypted_part, + unsigned long encrypted_part_len, + unsigned char *part, + unsigned long *part_len); ck_rv_t pakchois_generate_key (pakchois_session_t * session, - struct ck_mechanism *mechanism, - struct ck_attribute *templ, - unsigned long count, ck_object_handle_t * key); + struct ck_mechanism *mechanism, + struct ck_attribute *templ, + unsigned long count, ck_object_handle_t * key); ck_rv_t pakchois_generate_key_pair (pakchois_session_t * session, - struct ck_mechanism *mechanism, - struct ck_attribute *public_key_template, - unsigned long public_key_attribute_count, - struct ck_attribute *private_key_template, - unsigned long private_key_attribute_count, - ck_object_handle_t * public_key, - ck_object_handle_t * private_key); + struct ck_mechanism *mechanism, + struct ck_attribute *public_key_template, + unsigned long public_key_attribute_count, + struct ck_attribute *private_key_template, + unsigned long private_key_attribute_count, + ck_object_handle_t * public_key, + ck_object_handle_t * private_key); ck_rv_t pakchois_wrap_key (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t wrapping_key, - ck_object_handle_t key, unsigned char *wrapped_key, - unsigned long *wrapped_key_len); + struct ck_mechanism *mechanism, + ck_object_handle_t wrapping_key, + ck_object_handle_t key, unsigned char *wrapped_key, + unsigned long *wrapped_key_len); ck_rv_t pakchois_unwrap_key (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t unwrapping_key, - unsigned char *wrapped_key, - unsigned long wrapped_key_len, - struct ck_attribute *templ, - unsigned long attribute_count, - ck_object_handle_t * key); + struct ck_mechanism *mechanism, + ck_object_handle_t unwrapping_key, + unsigned char *wrapped_key, + unsigned long wrapped_key_len, + struct ck_attribute *templ, + unsigned long attribute_count, + ck_object_handle_t * key); ck_rv_t pakchois_derive_key (pakchois_session_t * session, - struct ck_mechanism *mechanism, - ck_object_handle_t base_key, - struct ck_attribute *templ, - unsigned long attribute_count, - ck_object_handle_t * key); + struct ck_mechanism *mechanism, + ck_object_handle_t base_key, + struct ck_attribute *templ, + unsigned long attribute_count, + ck_object_handle_t * key); ck_rv_t pakchois_seed_random (pakchois_session_t * session, - unsigned char *seed, unsigned long seed_len); + unsigned char *seed, unsigned long seed_len); ck_rv_t pakchois_generate_random (pakchois_session_t * session, - unsigned char *random_data, - unsigned long random_len); + unsigned char *random_data, + unsigned long random_len); #endif /* PAKCHOIS_H */ |