|
Botan 3.11.0
Crypto and TLS for C&
|
Provides access to all PKCS #11 functions. More...
#include <p11.h>
Public Member Functions | |
| bool | C_AsyncComplete (SessionHandle session, const Utf8Char *function_name_ptr, AsyncData *result_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_AsyncGetID (SessionHandle session, const Utf8Char *function_name_ptr, Ulong *id_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_AsyncJoin (SessionHandle session, const Utf8Char *function_name_ptr, Ulong id, Byte *data_ptr, Ulong data_len, ReturnValue *return_value=ThrowException) |
| bool | C_CancelFunction (SessionHandle session, ReturnValue *return_value=ThrowException) const |
| bool | C_CloseAllSessions (SlotId slot_id, ReturnValue *return_value=ThrowException) const |
| bool | C_CloseSession (SessionHandle session, ReturnValue *return_value=ThrowException) const |
| bool | C_CopyObject (SessionHandle session, ObjectHandle object, Attribute *attribute_template_ptr, Ulong count, ObjectHandle *new_object_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_CreateObject (SessionHandle session, Attribute *attribute_template_ptr, Ulong count, ObjectHandle *object_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DecapsulateKey (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle private_key, Attribute *template_ptr, Ulong attribute_count, const Byte *ciphertext_ptr, Ulong ciphertext_len, ObjectHandle *key_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_Decrypt (SessionHandle session, const Byte *encrypted_data_ptr, Ulong encrypted_data_len, Byte *data_ptr, Ulong *data_len_ptr, ReturnValue *return_value=ThrowException) const |
| template<typename TAllocA, typename TAllocB> | |
| bool | C_Decrypt (SessionHandle session, const std::vector< uint8_t, TAllocA > &encrypted_data, std::vector< uint8_t, TAllocB > &decrypted_data, ReturnValue *return_value=ThrowException) const |
| bool | C_DecryptDigestUpdate (SessionHandle session, const Byte *encrypted_part_ptr, Ulong encrypted_part_len, Byte *part_ptr, Ulong *part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DecryptFinal (SessionHandle session, Byte *last_part_ptr, Ulong *last_part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DecryptInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_DecryptMessage (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *associated_data_ptr, Ulong associated_data_len, const Byte *ciphertext_ptr, Ulong ciphertext_len, Byte *plaintext_ptr, Ulong *plaintext_len_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_DecryptMessageBegin (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *associated_data_ptr, Ulong associated_data_len, ReturnValue *return_value=ThrowException) |
| bool | C_DecryptMessageNext (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *ciphertext_part_ptr, Ulong ciphertext_part_len, Byte *plaintext_ptr, Ulong *plaintext_part_len_ptr, Flags flags, ReturnValue *return_value=ThrowException) |
| bool | C_DecryptUpdate (SessionHandle session, const Byte *encrypted_part_ptr, Ulong encrypted_part_len, Byte *part_ptr, Ulong *part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DecryptVerifyUpdate (SessionHandle session, const Byte *encrypted_part_ptr, Ulong encrypted_part_len, Byte *part_ptr, Ulong *part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DeriveKey (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle base_key, Attribute *attribute_template_ptr, Ulong attribute_count, ObjectHandle *key_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DestroyObject (SessionHandle session, ObjectHandle object, ReturnValue *return_value=ThrowException) const |
| bool | C_Digest (SessionHandle session, const Byte *data_ptr, Ulong data_len, Byte *digest_ptr, Ulong *digest_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DigestEncryptUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, Byte *encrypted_part_ptr, Ulong *encrypted_part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DigestFinal (SessionHandle session, Byte *digest_ptr, Ulong *digest_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DigestInit (SessionHandle session, const Mechanism *mechanism_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_DigestKey (SessionHandle session, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_DigestUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, ReturnValue *return_value=ThrowException) const |
| bool | C_EncapsulateKey (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle public_key, Attribute *template_ptr, Ulong attribute_count, Byte *ciphertext_ptr, Ulong *ciphertext_len_ptr, ObjectHandle *key_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_Encrypt (SessionHandle session, const Byte *data_ptr, Ulong data_len, Byte *encrypted_data, Ulong *encrypted_data_len_ptr, ReturnValue *return_value=ThrowException) const |
| template<typename TAllocA, typename TAllocB> | |
| bool | C_Encrypt (SessionHandle session, const std::vector< uint8_t, TAllocA > &plaintext_data, std::vector< uint8_t, TAllocB > &encrypted_data, ReturnValue *return_value=ThrowException) const |
| bool | C_EncryptFinal (SessionHandle session, Byte *last_encrypted_part_ptr, Ulong *last_encrypted_part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_EncryptInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_EncryptMessage (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *associated_data_ptr, Ulong associated_data_len, const Byte *plaintext_ptr, Ulong plaintext_len, Byte *ciphertext_ptr, Ulong *ciphertext_len_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_EncryptMessageBegin (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *associated_data_ptr, Ulong associated_data_len, ReturnValue *return_value=ThrowException) |
| bool | C_EncryptMessageNext (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *plaintext_part_ptr, Ulong plaintext_part_len, Byte *ciphertext_ptr, Ulong *ciphertext_part_len_ptr, Flags flags, ReturnValue *return_value=ThrowException) |
| bool | C_EncryptUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, Byte *encrypted_part_ptr, Ulong *encrypted_part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_Finalize (void *reserved, ReturnValue *return_value=ThrowException) const |
| bool | C_FindObjects (SessionHandle session, ObjectHandle *object_ptr, Ulong max_object_count, Ulong *object_count_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_FindObjectsFinal (SessionHandle session, ReturnValue *return_value=ThrowException) const |
| bool | C_FindObjectsInit (SessionHandle session, Attribute *attribute_template_ptr, Ulong count, ReturnValue *return_value=ThrowException) const |
| bool | C_GenerateKey (SessionHandle session, const Mechanism *mechanism_ptr, Attribute *attribute_template_ptr, Ulong count, ObjectHandle *key_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GenerateKeyPair (SessionHandle session, const Mechanism *mechanism_ptr, Attribute *public_key_template_ptr, Ulong public_key_attribute_count, Attribute *private_key_template_ptr, Ulong private_key_attribute_count, ObjectHandle *public_key_ptr, ObjectHandle *private_key_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GenerateRandom (SessionHandle session, Byte *random_data_ptr, Ulong random_len, ReturnValue *return_value=ThrowException) const |
| bool | C_GetAttributeValue (SessionHandle session, ObjectHandle object, Attribute *attribute_template_ptr, Ulong count, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_GetAttributeValue (SessionHandle session, ObjectHandle object, std::map< AttributeType, std::vector< uint8_t, TAlloc > > &attribute_values, ReturnValue *return_value=ThrowException) const |
| bool | C_GetFunctionStatus (SessionHandle session, ReturnValue *return_value=ThrowException) const |
| bool | C_GetInfo (Info *info_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetMechanismInfo (SlotId slot_id, MechanismType type, MechanismInfo *info_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetMechanismList (SlotId slot_id, MechanismType *mechanism_list_ptr, Ulong *count_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetMechanismList (SlotId slot_id, std::vector< MechanismType > &mechanisms, ReturnValue *return_value=ThrowException) const |
| bool | C_GetObjectSize (SessionHandle session, ObjectHandle object, Ulong *size_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetOperationState (SessionHandle session, Byte *operation_state_ptr, Ulong *operation_state_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetSessionInfo (SessionHandle session, SessionInfo *info_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetSessionValidationFlags (SessionHandle session, Ulong type, Flags *flags_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_GetSlotInfo (SlotId slot_id, SlotInfo *info_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetSlotList (Bbool token_present, SlotId *slot_list_ptr, Ulong *count_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_GetSlotList (bool token_present, std::vector< SlotId > &slot_ids, ReturnValue *return_value=ThrowException) const |
| bool | C_GetTokenInfo (SlotId slot_id, TokenInfo *info_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_Initialize (const void *init_args, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_InitPIN (SessionHandle session, const std::vector< uint8_t, TAlloc > &pin, ReturnValue *return_value=ThrowException) const |
| bool | C_InitPIN (SessionHandle session, const Utf8Char *pin_ptr, Ulong pin_len, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_InitToken (SlotId slot_id, const std::vector< uint8_t, TAlloc > &so_pin, std::string_view label, ReturnValue *return_value=ThrowException) const |
| bool | C_InitToken (SlotId slot_id, const Utf8Char *so_pin_ptr, Ulong so_pin_len, const Utf8Char *label_ptr, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_Login (SessionHandle session, UserType user_type, const std::vector< uint8_t, TAlloc > &pin, ReturnValue *return_value=ThrowException) const |
| bool | C_Login (SessionHandle session, UserType user_type, const Utf8Char *pin_ptr, Ulong pin_len, ReturnValue *return_value=ThrowException) const |
| bool | C_LoginUser (SessionHandle session, UserType user_type, const Utf8Char *pin_ptr, Ulong pin_len, const Utf8Char *username_ptr, Ulong username_len, ReturnValue *return_value=ThrowException) |
| bool | C_Logout (SessionHandle session, ReturnValue *return_value=ThrowException) const |
| bool | C_MessageDecryptFinal (SessionHandle session, ReturnValue *return_value=ThrowException) |
| bool | C_MessageDecryptInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) |
| bool | C_MessageEncryptFinal (SessionHandle session, ReturnValue *return_value=ThrowException) |
| bool | C_MessageEncryptInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) |
| bool | C_MessageSignFinal (SessionHandle session, ReturnValue *return_value=ThrowException) |
| bool | C_MessageSignInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) |
| bool | C_MessageVerifyFinal (SessionHandle session, ReturnValue *return_value=ThrowException) |
| bool | C_MessageVerifyInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) |
| bool | C_OpenSession (SlotId slot_id, Flags flags, void *application, Notify notify, SessionHandle *session_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_SeedRandom (SessionHandle session, const Byte *seed_ptr, Ulong seed_len, ReturnValue *return_value=ThrowException) const |
| bool | C_SessionCancel (SessionHandle session, Flags flags, ReturnValue *return_value=ThrowException) |
| bool | C_SetAttributeValue (SessionHandle session, ObjectHandle object, Attribute *attribute_template_ptr, Ulong count, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_SetAttributeValue (SessionHandle session, ObjectHandle object, std::map< AttributeType, std::vector< uint8_t, TAlloc > > &attribute_values, ReturnValue *return_value=ThrowException) const |
| bool | C_SetOperationState (SessionHandle session, const Byte *operation_state_ptr, Ulong operation_state_len, ObjectHandle encryption_key, ObjectHandle authentication_key, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_SetPIN (SessionHandle session, const std::vector< uint8_t, TAlloc > &old_pin, const std::vector< uint8_t, TAlloc > &new_pin, ReturnValue *return_value=ThrowException) const |
| bool | C_SetPIN (SessionHandle session, const Utf8Char *old_pin_ptr, Ulong old_len, const Utf8Char *new_pin_ptr, Ulong new_len, ReturnValue *return_value=ThrowException) const |
| bool | C_Sign (SessionHandle session, const Byte *data_ptr, Ulong data_len, Byte *signature_ptr, Ulong *signature_len_ptr, ReturnValue *return_value=ThrowException) const |
| template<typename TAllocA, typename TAllocB> | |
| bool | C_Sign (SessionHandle session, const std::vector< uint8_t, TAllocA > &data, std::vector< uint8_t, TAllocB > &signature, ReturnValue *return_value=ThrowException) const |
| bool | C_SignEncryptUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, Byte *encrypted_part_ptr, Ulong *encrypted_part_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_SignFinal (SessionHandle session, Byte *signature_ptr, Ulong *signature_len_ptr, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_SignFinal (SessionHandle session, std::vector< uint8_t, TAlloc > &signature, ReturnValue *return_value=ThrowException) const |
| bool | C_SignInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_SignMessage (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *data_ptr, Ulong data_len, Byte *signature_ptr, Ulong *signature_len_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_SignMessageBegin (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, ReturnValue *return_value=ThrowException) |
| bool | C_SignMessageNext (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *data_ptr, Ulong data_len, Byte *signature_ptr, Ulong *signature_len_ptr, ReturnValue *return_value=ThrowException) |
| bool | C_SignRecover (SessionHandle session, const Byte *data_ptr, Ulong data_len, Byte *signature_ptr, Ulong *signature_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_SignRecoverInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_SignUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_SignUpdate (SessionHandle session, const std::vector< uint8_t, TAlloc > &part, ReturnValue *return_value=ThrowException) const |
| bool | C_UnwrapKey (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle unwrapping_key, const Byte *wrapped_key_ptr, Ulong wrapped_key_len, Attribute *attribute_template_ptr, Ulong attribute_count, ObjectHandle *key_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_UnwrapKeyAuthenticated (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle unwrapping_key, const Byte *wrapped_key_ptr, Ulong wrapped_key_len, Attribute *attribute_template_ptr, Ulong attribute_count, const Byte *associated_data_ptr, Ulong associated_data_len, ObjectHandle *key_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_Verify (SessionHandle session, const Byte *data_ptr, Ulong data_len, const Byte *signature_ptr, Ulong signature_len, ReturnValue *return_value=ThrowException) const |
| template<typename TAllocA, typename TAllocB> | |
| bool | C_Verify (SessionHandle session, const std::vector< uint8_t, TAllocA > &data, std::vector< uint8_t, TAllocB > &signature, ReturnValue *return_value=ThrowException) const |
| bool | C_VerifyFinal (SessionHandle session, const Byte *signature_ptr, Ulong signature_len, ReturnValue *return_value=ThrowException) const |
| bool | C_VerifyInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_VerifyMessage (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *data_ptr, Ulong data_len, const Byte *signature_ptr, Ulong signature_len, ReturnValue *return_value=ThrowException) |
| bool | C_VerifyMessageBegin (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, ReturnValue *return_value=ThrowException) |
| bool | C_VerifyMessageNext (SessionHandle session, const void *parameter_ptr, Ulong parameter_len, const Byte *data_ptr, Ulong data_len, const Byte *signature_ptr, Ulong signature_len, ReturnValue *return_value=ThrowException) |
| bool | C_VerifyRecover (SessionHandle session, const Byte *signature_ptr, Ulong signature_len, Byte *data_ptr, Ulong *data_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_VerifyRecoverInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, ReturnValue *return_value=ThrowException) const |
| bool | C_VerifySignature (SessionHandle session, const Byte *data_ptr, Ulong data_len, ReturnValue *return_value=ThrowException) |
| bool | C_VerifySignatureFinal (SessionHandle session, ReturnValue *return_value=ThrowException) |
| bool | C_VerifySignatureInit (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle key, const Byte *signature_ptr, Ulong signature_len, ReturnValue *return_value=ThrowException) |
| bool | C_VerifySignatureUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, ReturnValue *return_value=ThrowException) |
| bool | C_VerifyUpdate (SessionHandle session, const Byte *part_ptr, Ulong part_len, ReturnValue *return_value=ThrowException) const |
| template<typename TAlloc> | |
| bool | C_VerifyUpdate (SessionHandle session, std::vector< uint8_t, TAlloc > part, ReturnValue *return_value=ThrowException) const |
| bool | C_WaitForSlotEvent (Flags flags, SlotId *slot_ptr, void *reserved, ReturnValue *return_value=ThrowException) const |
| bool | C_WrapKey (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle wrapping_key, ObjectHandle key, Byte *wrapped_key_ptr, Ulong *wrapped_key_len_ptr, ReturnValue *return_value=ThrowException) const |
| bool | C_WrapKeyAuthenticated (SessionHandle session, const Mechanism *mechanism_ptr, ObjectHandle wrapping_key, ObjectHandle key, const Byte *associated_data_ptr, Ulong associated_data_len, Byte *wrapped_key_ptr, Ulong *wrapped_key_len_ptr, ReturnValue *return_value=ThrowException) const |
| FunctionList * | get_functions () const |
| const InterfaceWrapper & | get_interface () |
| LowLevel (FunctionList *ptr) | |
| LowLevel (InterfaceWrapper interface_wrapper) | |
Static Public Member Functions | |
| static bool | C_GetFunctionList (const Dynamically_Loaded_Library &pkcs11_module, FunctionList **function_list_ptr_ptr, ReturnValue *return_value=ThrowException) |
| static bool | C_GetInterface (const Dynamically_Loaded_Library &pkcs11_module, const Utf8Char *interface_name_ptr, const Version *version_ptr, Interface *interface_ptr_ptr, Flags flags, ReturnValue *return_value=ThrowException) |
| static bool | C_GetInterfaceList (const Dynamically_Loaded_Library &pkcs11_module, Interface *interface_list_ptr, Ulong *count_ptr, ReturnValue *return_value=ThrowException) |
Static Protected Member Functions | |
| static bool | handle_return_value (CK_RV function_result, ReturnValue *return_value) |
|
explicit |
| ptr | the function list pointer to use. Can be retrieved via LowLevel::C_GetFunctionList |
Definition at line 64 of file p11.cpp.
References BOTAN_ARG_CHECK, and Botan::PKCS11::InterfaceWrapper::p11_interface_name_ptr().
|
explicit |
| bool Botan::PKCS11::LowLevel::C_AsyncComplete | ( | SessionHandle | session, |
| const Utf8Char * | function_name_ptr, | ||
| AsyncData * | result_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_AsyncComplete checks if the function identified by function_name_ptr has completed an asynchronous operation and, if so, returns the associated result(s).
| session | the session's handle |
| function_name_ptr | pkcs11 function name |
| result_ptr | operation result |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1184 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_AsyncGetID | ( | SessionHandle | session, |
| const Utf8Char * | function_name_ptr, | ||
| Ulong * | id_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_AsyncGetID is used to persist an operation past a C_Finalize call and allow another instance of the client to reconnect after a call to C_Initialize. C_AsyncGetID places a module dependent identifier for the asynchronous operation being performed by the function identified by function_name_ptr.
| session | the session's handle |
| function_name_ptr | pkcs11 function name |
| id_ptr | persistent operation id |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1193 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_AsyncJoin | ( | SessionHandle | session, |
| const Utf8Char * | function_name_ptr, | ||
| Ulong | id, | ||
| Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_AsyncJoin checks if the function identified by function_name_ptr and id is a valid asynchronous operation and, if so, reconnects the client application to the module using the buffer specified by data_ptr and data_len in place of those passed into the original call to function_name_ptr.
| session | the session's handle |
| function_name_ptr | pkcs11 function name |
| id | persistent operation id |
| data_ptr | location for the data |
| data_len | data length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1202 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_CancelFunction | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) const |
C_CancelFunction is a legacy function; it cancels a function running in parallel.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1178 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_CloseAllSessions | ( | SlotId | slot_id, |
| ReturnValue * | return_value = ThrowException ) const |
C_CloseAllSessions closes all sessions with a token.
| slot_id | the token's slot |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 257 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_CloseSession | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) const |
C_CloseSession closes a session between an application and a token.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 253 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Session::~Session().
| bool Botan::PKCS11::LowLevel::C_CopyObject | ( | SessionHandle | session, |
| ObjectHandle | object, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | count, | ||
| ObjectHandle * | new_object_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_CopyObject copies an object, creating a new object for the copy.
| session | the session's handle |
| object | the object's handle |
| attribute_template_ptr | template for new object |
| count | attributes in template |
| new_object_ptr | receives handle of copy |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 337 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Object::copy().
| bool Botan::PKCS11::LowLevel::C_CreateObject | ( | SessionHandle | session, |
| Attribute * | attribute_template_ptr, | ||
| Ulong | count, | ||
| ObjectHandle * | object_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_CreateObject creates a new object.
| session | the session's handle |
| attribute_template_ptr | the object's template |
| count | attributes in template |
| object_ptr | gets new object's handle. |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 328 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecapsulateKey | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | private_key, | ||
| Attribute * | template_ptr, | ||
| Ulong | attribute_count, | ||
| const Byte * | ciphertext_ptr, | ||
| Ulong | ciphertext_len, | ||
| ObjectHandle * | key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_DecapsulateKey creates a new secret key object based on the private key and ciphertext generated by a prior encapsulate operation. This new key (called a ‘shared key’ in most KEM documentation) is identical to the key returned by C_EncapsulateKey when it was called with the matching public key and returned the same cipher text. This function is a KEM style function.
| session | the session's handle |
| mechanism_ptr | the decapsulation mechanism |
| private_key | the decapsulating key |
| template_ptr | new key template |
| attribute_count | template length |
| ciphertext_ptr | the wrapped key |
| ciphertext_len | the wrapped key size |
| key_ptr | the decapsulated key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1134 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_Decrypt | ( | SessionHandle | session, |
| const Byte * | encrypted_data_ptr, | ||
| Ulong | encrypted_data_len, | ||
| Byte * | data_ptr, | ||
| Ulong * | data_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_Decrypt decrypts encrypted data in a single part.
| session | session's handle |
| encrypted_data_ptr | ciphertext |
| encrypted_data_len | ciphertext length |
| data_ptr | gets plaintext |
| data_len_ptr | gets p-text size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 526 of file p11.cpp.
References handle_return_value().
|
inline |
C_Decrypt decrypts encrypted data in a single part.
| session | session's handle |
| encrypted_data | ciphertext |
| decrypted_data | gets plaintext |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 2564 of file p11.h.
References C_Decrypt(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_DecryptDigestUpdate | ( | SessionHandle | session, |
| const Byte * | encrypted_part_ptr, | ||
| Ulong | encrypted_part_len, | ||
| Byte * | part_ptr, | ||
| Ulong * | part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DecryptDigestUpdate continues a multiple-part decryption and digesting operation.
| session | session's handle |
| encrypted_part_ptr | ciphertext |
| encrypted_part_len | ciphertext length |
| part_ptr | gets plaintext |
| part_len_ptr | gets plaintext len |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 952 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptFinal | ( | SessionHandle | session, |
| Byte * | last_part_ptr, | ||
| Ulong * | last_part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DecryptFinal finishes a multiple-part decryption operation.
| session | the session's handle |
| last_part_ptr | gets plaintext |
| last_part_len_ptr | p-text size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 550 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DecryptInit initializes a decryption operation.
| session | the session's handle |
| mechanism_ptr | the decryption mechanism |
| key | handle of decryption key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 518 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptMessage | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | associated_data_ptr, | ||
| Ulong | associated_data_len, | ||
| const Byte * | ciphertext_ptr, | ||
| Ulong | ciphertext_len, | ||
| Byte * | plaintext_ptr, | ||
| Ulong * | plaintext_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_DecryptMessage decrypts an encrypted message in a single part.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| associated_data_ptr | AEAD Associated data |
| associated_data_len | AEAD Associated data length |
| ciphertext_ptr | cipher text |
| ciphertext_len | cipher text length |
| plaintext_ptr | gets plain text |
| plaintext_len_ptr | gets plain text length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 569 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptMessageBegin | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | associated_data_ptr, | ||
| Ulong | associated_data_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_DecryptMessageBegin begins a multiple-part message decryption operation.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| associated_data_ptr | AEAD Associated data |
| associated_data_len | AEAD Associated data length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 591 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptMessageNext | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | ciphertext_part_ptr, | ||
| Ulong | ciphertext_part_len, | ||
| Byte * | plaintext_ptr, | ||
| Ulong * | plaintext_part_len_ptr, | ||
| Flags | flags, | ||
| ReturnValue * | return_value = ThrowException ) |
C_DecryptMessageNext continues a multiple-part message decryption operation, processing another encrypted message part.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| ciphertext_part_ptr | cipher text |
| ciphertext_part_len | cipher text length |
| plaintext_ptr | gets plain text |
| plaintext_part_len_ptr | gets plain text length |
| flags | multi mode flag |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 606 of file p11.cpp.
References Botan::PKCS11::flags(), and handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptUpdate | ( | SessionHandle | session, |
| const Byte * | encrypted_part_ptr, | ||
| Ulong | encrypted_part_len, | ||
| Byte * | part_ptr, | ||
| Ulong * | part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DecryptUpdate continues a multiple-part decryption operation.
| session | session's handle |
| encrypted_part_ptr | encrypted data |
| encrypted_part_len | input length |
| part_ptr | gets plaintext |
| part_len_ptr | p-text size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 538 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DecryptVerifyUpdate | ( | SessionHandle | session, |
| const Byte * | encrypted_part_ptr, | ||
| Ulong | encrypted_part_len, | ||
| Byte * | part_ptr, | ||
| Ulong * | part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DecryptVerifyUpdate continues a multiple-part decryption and verify operation.
| session | session's handle |
| encrypted_part_ptr | ciphertext |
| encrypted_part_len | ciphertext length |
| part_ptr | gets plaintext |
| part_len_ptr | gets p-text length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 976 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DeriveKey | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | base_key, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | attribute_count, | ||
| ObjectHandle * | key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DeriveKey derives a key from a base key, creating a new key object.
| session | session's handle |
| mechanism_ptr | key deriv. mech. |
| base_key | base key |
| attribute_template_ptr | new key template |
| attribute_count | template length |
| key_ptr | gets new handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1055 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DestroyObject | ( | SessionHandle | session, |
| ObjectHandle | object, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DestroyObject destroys an object.
| session | the session's handle |
| object | the object's handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 348 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Object::destroy().
| bool Botan::PKCS11::LowLevel::C_Digest | ( | SessionHandle | session, |
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| Byte * | digest_ptr, | ||
| Ulong * | digest_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_Digest digests data in a single part.
| session | the session's handle |
| data_ptr | data to be digested |
| data_len | bytes of data to digest |
| digest_ptr | gets the message digest |
| digest_len_ptr | gets digest length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 638 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DigestEncryptUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| Byte * | encrypted_part_ptr, | ||
| Ulong * | encrypted_part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DigestEncryptUpdate continues a multiple-part digesting and encryption operation.
| session | session's handle |
| part_ptr | the plaintext data |
| part_len | plaintext length |
| encrypted_part_ptr | gets ciphertext |
| encrypted_part_len_ptr | gets c-text length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 940 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DigestFinal | ( | SessionHandle | session, |
| Byte * | digest_ptr, | ||
| Ulong * | digest_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DigestFinal finishes a multiple-part message-digesting operation.
| session | the session's handle |
| digest_ptr | gets the message digest |
| digest_len_ptr | gets uint8_t count of digest |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 661 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DigestInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DigestInit initializes a message-digesting operation.
| session | the session's handle |
| mechanism_ptr | the digesting mechanism |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 633 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DigestKey | ( | SessionHandle | session, |
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DigestKey continues a multi-part message-digesting operation, by digesting the value of a secret key as part of the data already digested.
| session | the session's handle |
| key | secret key to digest |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 657 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_DigestUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_DigestUpdate continues a multiple-part message-digesting operation.
| session | the session's handle |
| part_ptr | data to be digested |
| part_len | bytes of data to be digested |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 649 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_EncapsulateKey | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | public_key, | ||
| Attribute * | template_ptr, | ||
| Ulong | attribute_count, | ||
| Byte * | ciphertext_ptr, | ||
| Ulong * | ciphertext_len_ptr, | ||
| ObjectHandle * | key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_EncapulateKey creates a new secret key object from a public key using a KEM.
| session | the session's handle |
| mechanism_ptr | the encapsulation mechanism |
| public_key | the encapsulating key |
| template_ptr | new key template |
| attribute_count | template length |
| ciphertext_ptr | the wrapped key |
| ciphertext_len_ptr | the wrapped key size |
| key_ptr | the encapsulated key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1114 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_Encrypt | ( | SessionHandle | session, |
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| Byte * | encrypted_data, | ||
| Ulong * | encrypted_data_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_Encrypt encrypts single-part data.
| session | session's handle |
| data_ptr | the plaintext data |
| data_len | size of plaintext data in bytes |
| encrypted_data | gets ciphertext |
| encrypted_data_len_ptr | gets c-text size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 411 of file p11.cpp.
References handle_return_value().
|
inline |
C_Encrypt encrypts single-part data.
| session | session's handle |
| plaintext_data | the plaintext data |
| encrypted_data | gets ciphertext |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 2331 of file p11.h.
References C_Encrypt(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_EncryptFinal | ( | SessionHandle | session, |
| Byte * | last_encrypted_part_ptr, | ||
| Ulong * | last_encrypted_part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_EncryptFinal finishes a multiple-part encryption operation.
| session | session handle |
| last_encrypted_part_ptr | last c-text |
| last_encrypted_part_len_ptr | gets last size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 435 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_EncryptInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_EncryptInit initializes an encryption operation.
| session | the session's handle |
| mechanism_ptr | the encryption mechanism |
| key | handle of encryption key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 403 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_EncryptMessage | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | associated_data_ptr, | ||
| Ulong | associated_data_len, | ||
| const Byte * | plaintext_ptr, | ||
| Ulong | plaintext_len, | ||
| Byte * | ciphertext_ptr, | ||
| Ulong * | ciphertext_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_EncryptMessage encrypts a message in a single part.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| associated_data_ptr | AEAD Associated data |
| associated_data_len | AEAD Associated data length |
| plaintext_ptr | plain text |
| plaintext_len | plain text length |
| ciphertext_ptr | gets cipher text |
| ciphertext_len_ptr | gets cipher text length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 455 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_EncryptMessageBegin | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | associated_data_ptr, | ||
| Ulong | associated_data_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_EncryptMessageBegin begins a multiple-part message encryption operation.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| associated_data_ptr | AEAD Associated data |
| associated_data_len | AEAD Associated data length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 477 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_EncryptMessageNext | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | plaintext_part_ptr, | ||
| Ulong | plaintext_part_len, | ||
| Byte * | ciphertext_ptr, | ||
| Ulong * | ciphertext_part_len_ptr, | ||
| Flags | flags, | ||
| ReturnValue * | return_value = ThrowException ) |
C_EncryptMessageNext continues a multiple-part message encryption operation, processing another message part.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| plaintext_part_ptr | plain text |
| plaintext_part_len | plain text length |
| ciphertext_ptr | gets cipher text |
| ciphertext_part_len_ptr | gets cipher text length |
| flags | multi mode flag |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 492 of file p11.cpp.
References Botan::PKCS11::flags(), and handle_return_value().
| bool Botan::PKCS11::LowLevel::C_EncryptUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| Byte * | encrypted_part_ptr, | ||
| Ulong * | encrypted_part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_EncryptUpdate continues a multiple-part encryption operation.
| session | session's handle |
| part_ptr | the plaintext data |
| part_len | plaintext data len |
| encrypted_part_ptr | gets ciphertext |
| encrypted_part_len_ptr | gets c-text size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 423 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_Finalize | ( | void * | reserved, |
| ReturnValue * | return_value = ThrowException ) const |
C_Finalize indicates that an application is done with the Cryptoki library.
| reserved | reserved. Should be nullptr |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 82 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_FindObjects | ( | SessionHandle | session, |
| ObjectHandle * | object_ptr, | ||
| Ulong | max_object_count, | ||
| Ulong * | object_count_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_FindObjects continues a search for token and session objects that match a template, obtaining additional object handles.
| session | session's handle |
| object_ptr | gets obj. handles |
| max_object_count | max handles to get |
| object_count_ptr | actual # returned |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 387 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::ObjectFinder::find().
| bool Botan::PKCS11::LowLevel::C_FindObjectsFinal | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) const |
C_FindObjectsFinal finishes a search for token and session objects.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 397 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::ObjectFinder::finish(), and Botan::PKCS11::ObjectFinder::~ObjectFinder().
| bool Botan::PKCS11::LowLevel::C_FindObjectsInit | ( | SessionHandle | session, |
| Attribute * | attribute_template_ptr, | ||
| Ulong | count, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_FindObjectsInit initializes a search for token and session objects that match a template.
| session | the session's handle |
| attribute_template_ptr | attribute values to match |
| count | attrs in search template |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 379 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::ObjectFinder::ObjectFinder().
| bool Botan::PKCS11::LowLevel::C_GenerateKey | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | count, | ||
| ObjectHandle * | key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GenerateKey generates a secret key, creating a new key object.
| session | the session's handle |
| mechanism_ptr | key generation mech. |
| attribute_template_ptr | template for new key |
| count | # of attrs in template |
| key_ptr | gets handle of new key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 990 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GenerateKeyPair | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| Attribute * | public_key_template_ptr, | ||
| Ulong | public_key_attribute_count, | ||
| Attribute * | private_key_template_ptr, | ||
| Ulong | private_key_attribute_count, | ||
| ObjectHandle * | public_key_ptr, | ||
| ObjectHandle * | private_key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GenerateKeyPair generates a public-key/private-key pair, creating new key objects.
| session | session handle |
| mechanism_ptr | key-gen mech. |
| public_key_template_ptr | template for pub. key |
| public_key_attribute_count | # pub. attrs. |
| private_key_template_ptr | template for priv. key |
| private_key_attribute_count | # priv. attrs. |
| public_key_ptr | gets pub. key handle |
| private_key_ptr | gets priv. key handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1002 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GenerateRandom | ( | SessionHandle | session, |
| Byte * | random_data_ptr, | ||
| Ulong | random_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GenerateRandom generates random data.
| session | the session's handle |
| random_data_ptr | receives the random data |
| random_len | # of bytes to generate |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1164 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetAttributeValue | ( | SessionHandle | session, |
| ObjectHandle | object, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | count, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetAttributeValue obtains the value of one or more object attributes.
| session | the session's handle |
| object | the object's handle |
| attribute_template_ptr | specifies attrs; gets vals |
| count | attributes in template |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 359 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Object::get_attribute_value().
|
inline |
C_GetAttributeValue obtains the value of one or more object attributes.
| session | the session's handle |
| object | the object's handle |
| attribute_values | specifies attrs; gets vals |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 2112 of file p11.h.
References C_GetAttributeValue(), and Botan::PKCS11::ThrowException.
|
static |
C_GetFunctionList returns the function list.
| pkcs11_module | The PKCS #11 module |
| function_list_ptr_ptr | receives pointer to function list |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 90 of file p11.cpp.
References handle_return_value(), and Botan::Dynamically_Loaded_Library::resolve().
Referenced by Botan::PKCS11::InterfaceWrapper::latest_p11_interface().
| bool Botan::PKCS11::LowLevel::C_GetFunctionStatus | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) const |
C_GetFunctionStatus is a legacy function; it obtains an updated status of a function running in parallel with an application.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1174 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetInfo | ( | Info * | info_ptr, |
| ReturnValue * | return_value = ThrowException ) const |
C_GetInfo returns general information about Cryptoki.
| info_ptr | location that receives information |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 86 of file p11.cpp.
References handle_return_value().
|
static |
C_GetInterface is used to obtain an interface supported by a Cryptoki library. pInterfaceName specifies the name of the interface, pVersion specifies the interface version, ppInterface points to the location that receives the interface, flags specifies the required interface flags. There are multiple ways for an application to specify a particular interface when calling C_GetInterface:
| pkcs11_module | The PKCS #11 module |
| interface_name_ptr | name of the interface |
| version_ptr | version of the interface |
| interface_ptr_ptr | returned interface |
| flags | flags controlling the semantics of the interface |
| return_value | default value (ThrowException): throw exception on error. |
Definition at line 113 of file p11.cpp.
References CKR_GENERAL_ERROR, Botan::PKCS11::flags(), get_interface(), handle_return_value(), and Botan::Dynamically_Loaded_Library::try_resolve_symbol().
|
static |
C_GetInterfaceList is used to obtain a list of interfaces supported by a Cryptoki library. count_ptr points to the location that receives the number of interfaces. There are two ways for an application to call C_GetInterfaceList:
Because C_GetInterfaceList does not allocate any space of its own, an application will often call C_GetInterfaceList twice. However, this behavior is by no means required. C_GetInterfaceList obtains (in *pFunctionList of each interface) a pointer to the Cryptoki library’s list of function pointers. The pointer thus obtained may point into memory which is owned by the Cryptoki library, and which may or may not be writable. Whether or not this is the case, no attempt should be made to write to this memory. The same caveat applies to the interface names returned.
| pkcs11_module | The PKCS #11 module |
| interface_list_ptr | returned interfaces |
| count_ptr | number of interfaces returned |
| return_value | default value (ThrowException): throw exception on error. |
Definition at line 100 of file p11.cpp.
References CKR_GENERAL_ERROR, handle_return_value(), and Botan::Dynamically_Loaded_Library::try_resolve_symbol().
Referenced by Botan::PKCS11::InterfaceWrapper::latest_p11_interface().
| bool Botan::PKCS11::LowLevel::C_GetMechanismInfo | ( | SlotId | slot_id, |
| MechanismType | type, | ||
| MechanismInfo * | info_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetMechanismInfo obtains information about a particular mechanism possibly supported by a token.
| slot_id | ID of the token's slot |
| type | type of mechanism |
| info_ptr | receives mechanism info |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 201 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetMechanismList | ( | SlotId | slot_id, |
| MechanismType * | mechanism_list_ptr, | ||
| Ulong * | count_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetMechanismList obtains a list of mechanism types supported by a token.
| slot_id | ID of token's slot |
| mechanism_list_ptr | gets mech. array |
| count_ptr | gets # of mechs. |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 172 of file p11.cpp.
References handle_return_value().
Referenced by C_GetMechanismList().
| bool Botan::PKCS11::LowLevel::C_GetMechanismList | ( | SlotId | slot_id, |
| std::vector< MechanismType > & | mechanisms, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetMechanismList obtains a list of mechanism types supported by a token.
| slot_id | ID of token's slot |
| mechanisms | receives vector of supported mechanisms |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 181 of file p11.cpp.
References C_GetMechanismList().
| bool Botan::PKCS11::LowLevel::C_GetObjectSize | ( | SessionHandle | session, |
| ObjectHandle | object, | ||
| Ulong * | size_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetObjectSize gets the size of an object in bytes.
| session | the session's handle |
| object | the object's handle |
| size_ptr | receives size of object |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 352 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetOperationState | ( | SessionHandle | session, |
| Byte * | operation_state_ptr, | ||
| Ulong * | operation_state_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetOperationState obtains the state of the cryptographic operation in a session.
| session | session's handle |
| operation_state_ptr | gets state |
| operation_state_len_ptr | gets state length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 269 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetSessionInfo | ( | SessionHandle | session, |
| SessionInfo * | info_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetSessionInfo obtains information about the session.
| session | the session's handle |
| info_ptr | receives session info |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 261 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Session::get_info().
| bool Botan::PKCS11::LowLevel::C_GetSessionValidationFlags | ( | SessionHandle | session, |
| Ulong | type, | ||
| Flags * | flags_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_GetSessionValidationFlags fetches the requested flags from the session. See Validation indicators (section4.15.3.1) for meaning and semantics for these flags. Applications are responsible for the appropriate locking to protect session to get a meaningful result from this call.
| session | the session's handle |
| type | which state of flags |
| flags_ptr | validation flags |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 318 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetSlotInfo | ( | SlotId | slot_id, |
| SlotInfo * | info_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetSlotInfo obtains information about a particular slot in the system.
| slot_id | the ID of the slot |
| info_ptr | receives the slot information |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 159 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_GetSlotList | ( | Bbool | token_present, |
| SlotId * | slot_list_ptr, | ||
| Ulong * | count_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetSlotList obtains a list of slots in the system.
| token_present | only slots with tokens |
| slot_list_ptr | receives array of slot IDs |
| count_ptr | receives number of slots |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 134 of file p11.cpp.
References handle_return_value().
Referenced by C_GetSlotList().
| bool Botan::PKCS11::LowLevel::C_GetSlotList | ( | bool | token_present, |
| std::vector< SlotId > & | slot_ids, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetSlotList obtains a list of slots in the system.
| token_present | only slots with tokens |
| slot_ids | receives vector of slot IDs |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 142 of file p11.cpp.
References C_GetSlotList().
| bool Botan::PKCS11::LowLevel::C_GetTokenInfo | ( | SlotId | slot_id, |
| TokenInfo * | info_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_GetTokenInfo obtains information about a particular token in the system.
| slot_id | ID of the token's slot |
| info_ptr | receives the token information |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 163 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_Initialize | ( | const void * | init_args, |
| ReturnValue * | return_value = ThrowException ) const |
C_Initialize initializes the Cryptoki library.
| init_args | if this is not nullptr, it gets cast to (C_InitializeArgs) and dereferenced |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 78 of file p11.cpp.
References handle_return_value().
|
inline |
C_InitPIN initializes the normal user's PIN.
| session | the session's handle |
| pin | the normal user's PIN |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1690 of file p11.h.
References C_InitPIN(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_InitPIN | ( | SessionHandle | session, |
| const Utf8Char * | pin_ptr, | ||
| Ulong | pin_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_InitPIN initializes the normal user's PIN.
| session | the session's handle |
| pin_ptr | the normal user's PIN |
| pin_len | length in bytes of the PIN |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 221 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Session::init_pin().
|
inline |
C_InitToken initializes a token.
| slot_id | ID of the token's slot |
| so_pin | the SO's initial PIN |
| label | token label (at max 32 bytes long) |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1637 of file p11.h.
References C_InitToken(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_InitToken | ( | SlotId | slot_id, |
| const Utf8Char * | so_pin_ptr, | ||
| Ulong | so_pin_len, | ||
| const Utf8Char * | label_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_InitToken initializes a token.
| slot_id | ID of the token's slot |
| so_pin_ptr | the SO's initial PIN |
| so_pin_len | length in bytes of the SO_PIN |
| label_ptr | 32-byte token label (blank padded) |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 210 of file p11.cpp.
References handle_return_value().
|
inline |
C_Login logs a user into a token.
| session | the session's handle |
| user_type | the user type |
| pin | the user or security officer's PIN |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1921 of file p11.h.
References C_Login(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_Login | ( | SessionHandle | session, |
| UserType | user_type, | ||
| const Utf8Char * | pin_ptr, | ||
| Ulong | pin_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_Login logs a user into a token.
| session | the session's handle |
| user_type | the user type |
| pin_ptr | the user's PIN |
| pin_len | the length of the PIN |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 290 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Session::login().
| bool Botan::PKCS11::LowLevel::C_LoginUser | ( | SessionHandle | session, |
| UserType | user_type, | ||
| const Utf8Char * | pin_ptr, | ||
| Ulong | pin_len, | ||
| const Utf8Char * | username_ptr, | ||
| Ulong | username_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_LoginUser logs a user into a token.
| session | the session's handle |
| user_type | the user type |
| pin_ptr | the user's PIN |
| pin_len | the length of the PIN |
| username_ptr | the user's name |
| username_len | the length of the user's name |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 298 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_Logout | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) const |
C_Logout logs a user out from a token.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 314 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Session::logoff(), and Botan::PKCS11::Session::~Session().
| bool Botan::PKCS11::LowLevel::C_MessageDecryptFinal | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) |
C_MessageDecryptFinal finishes a message-based decryption process.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 627 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageDecryptInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) |
C_MessageDecryptInit initializes a message-based decryption process, preparing a session for one or more decryption operations that use the same decryption mechanism and decryption key.
| session | the session's handle |
| mechanism_ptr | the decryption mechanism |
| key | handle of decryption key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 560 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageEncryptFinal | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) |
C_MessageDecryptFinal finishes a message-based decryption process.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 512 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageEncryptInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) |
C_MessageEncryptInit prepares a session for one or more encryption operations that use the same encryption mechanism and encryption key.
| session | the session's handle |
| mechanism_ptr | the encryption mechanism |
| key | handle of encryption key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 446 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageSignFinal | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) |
C_MessageSignFinal finishes a message-based signing process.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 782 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageSignInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) |
C_MessageSignInit initializes a message-based signature process, preparing a session for one or more signature operations (where the signature is an appendix to the data) that use the same signature mechanism and signature key.
| session | the session's handle |
| mechanism_ptr | the signing mechanism |
| key | handle of signing key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 728 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageVerifyFinal | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) |
C_MessageVerifyFinal finishes a message-based verification process.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 934 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_MessageVerifyInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) |
C_MessageVerifyInit initializes a message-based verification process, preparing a session for one or more verification operations (where the signature is an appendix to the data) that use the same verification mechanism and verification key.
| session | the session's handle |
| mechanism_ptr | the signing mechanism |
| key | handle of signing key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 880 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_OpenSession | ( | SlotId | slot_id, |
| Flags | flags, | ||
| void * | application, | ||
| Notify | notify, | ||
| SessionHandle * | session_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_OpenSession opens a session between an application and a token.
| slot_id | the slot's ID |
| flags | from CK_SESSION_INFO |
| application | passed to callback |
| notify | callback function |
| session_ptr | gets session handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 243 of file p11.cpp.
References Botan::PKCS11::flags(), and handle_return_value().
Referenced by Botan::PKCS11::Session::Session().
| bool Botan::PKCS11::LowLevel::C_SeedRandom | ( | SessionHandle | session, |
| const Byte * | seed_ptr, | ||
| Ulong | seed_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SeedRandom mixes additional seed material into the token's random number generator.
| session | the session's handle |
| seed_ptr | the seed material |
| seed_len | length of seed material |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1156 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SessionCancel | ( | SessionHandle | session, |
| Flags | flags, | ||
| ReturnValue * | return_value = ThrowException ) |
C_SessionCancel terminates active session based operations.
| session | the session's handle |
| flags | flags control which sessions are cancelled |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 265 of file p11.cpp.
References Botan::PKCS11::flags(), and handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SetAttributeValue | ( | SessionHandle | session, |
| ObjectHandle | object, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | count, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SetAttributeValue modifies the value of one or more object attributes.
| session | the session's handle |
| object | the object's handle |
| attribute_template_ptr | specifies attrs and values |
| count | attributes in template |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 369 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Object::set_attribute_value().
|
inline |
C_SetAttributeValue modifies the value of one or more object attributes.
| session | the session's handle |
| object | the object's handle |
| attribute_values | specifies attrs and values |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 2190 of file p11.h.
References C_SetAttributeValue(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_SetOperationState | ( | SessionHandle | session, |
| const Byte * | operation_state_ptr, | ||
| Ulong | operation_state_len, | ||
| ObjectHandle | encryption_key, | ||
| ObjectHandle | authentication_key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SetOperationState restores the state of the cryptographic operation in a session.
| session | session's handle |
| operation_state_ptr | holds state |
| operation_state_len | holds state length |
| encryption_key | en/decryption key |
| authentication_key | sign/verify key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 278 of file p11.cpp.
References handle_return_value().
|
inline |
C_SetPIN modifies the PIN of the user who is logged in.
| session | the session's handle |
| old_pin | the old PIN |
| new_pin | the new PIN |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1741 of file p11.h.
References C_SetPIN(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_SetPIN | ( | SessionHandle | session, |
| const Utf8Char * | old_pin_ptr, | ||
| Ulong | old_len, | ||
| const Utf8Char * | new_pin_ptr, | ||
| Ulong | new_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SetPIN modifies the PIN of the user who is logged in.
| session | the session's handle |
| old_pin_ptr | the old PIN |
| old_len | length of the old PIN |
| new_pin_ptr | the new PIN |
| new_len | length of the new PIN |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 229 of file p11.cpp.
References handle_return_value().
Referenced by Botan::PKCS11::Session::set_pin().
| bool Botan::PKCS11::LowLevel::C_Sign | ( | SessionHandle | session, |
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| Byte * | signature_ptr, | ||
| Ulong * | signature_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_Sign signs (encrypts with private key) data in a single part, where the signature is (will be) an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| data_ptr | the data to sign |
| data_len | count of bytes to sign |
| signature_ptr | gets the signature |
| signature_len_ptr | gets signature length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 679 of file p11.cpp.
References handle_return_value().
|
inline |
C_Sign signs (encrypts with private key) data in a single part, where the signature is (will be) an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| data | the data to sign |
| signature | gets the signature |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 2900 of file p11.h.
References C_Sign(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_SignEncryptUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| Byte * | encrypted_part_ptr, | ||
| Ulong * | encrypted_part_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SignEncryptUpdate continues a multiple-part signing and encryption operation.
| session | session's handle |
| part_ptr | the plaintext data |
| part_len | plaintext length |
| encrypted_part_ptr | gets ciphertext |
| encrypted_part_len_ptr | gets c-text length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 964 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignFinal | ( | SessionHandle | session, |
| Byte * | signature_ptr, | ||
| Ulong * | signature_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SignFinal finishes a multiple-part signature operation, returning the signature.
| session | the session's handle |
| signature_ptr | gets the signature |
| signature_len_ptr | gets signature length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 698 of file p11.cpp.
References handle_return_value().
|
inline |
C_SignFinal finishes a multiple-part signature operation, returning the signature.
| session | the session's handle |
| signature | gets the signature |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 3000 of file p11.h.
References C_SignFinal(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_SignInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SignInit initializes a signature (private key encryption) operation, where the signature is (will be) an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| mechanism_ptr | the signature mechanism |
| key | handle of signature key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 671 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignMessage | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| Byte * | signature_ptr, | ||
| Ulong * | signature_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_SignMessage signs a message in a single part, where the signature is an appendix to the message. C_MessageSignInit must previously been called on the session.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| data_ptr | data to sign |
| data_len | data to sign length |
| signature_ptr | gets signature |
| signature_len_ptr | gets signature length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 737 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignMessageBegin | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_SignMessageBegin begins a multiple-part message signature operation, where the signature is an appendix to the message. C_MessageSignInit must previously been called on the session.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 755 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignMessageNext | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| Byte * | signature_ptr, | ||
| Ulong * | signature_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) |
C_SignMessageNext continues a multiple-part message signature operation, processing another data part, or finishes a multiple-part message signature operation, returning the signature.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| data_ptr | data to sign |
| data_len | data to sign length |
| signature_ptr | gets signature |
| signature_len_ptr | gets signature length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 764 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignRecover | ( | SessionHandle | session, |
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| Byte * | signature_ptr, | ||
| Ulong * | signature_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SignRecover signs data in a single operation, where the data can be recovered from the signature.
| session | the session's handle |
| data_ptr | the data to sign |
| data_len | count of bytes to sign |
| signature_ptr | gets the signature |
| signature_len_ptr | gets signature length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 715 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignRecoverInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SignRecoverInit initializes a signature operation, where the data can be recovered from the signature.
| session | the session's handle |
| mechanism_ptr | the signature mechanism |
| key | handle of the signature key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 706 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_SignUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_SignUpdate continues a multiple-part signature operation, where the signature is (will be) an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| part_ptr | the data to sign |
| part_len | count of bytes to sign |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 690 of file p11.cpp.
References handle_return_value().
|
inline |
C_SignUpdate continues a multiple-part signature operation, where the signature is (will be) an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| part | the data to sign |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 2957 of file p11.h.
References C_SignUpdate(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_UnwrapKey | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | unwrapping_key, | ||
| const Byte * | wrapped_key_ptr, | ||
| Ulong | wrapped_key_len, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | attribute_count, | ||
| ObjectHandle * | key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_UnwrapKey unwraps (decrypts) a wrapped key, creating a new key object.
| session | session's handle |
| mechanism_ptr | unwrapping mech. |
| unwrapping_key | unwrapping key |
| wrapped_key_ptr | the wrapped key |
| wrapped_key_len | wrapped key len |
| attribute_template_ptr | new key template |
| attribute_count | template length |
| key_ptr | gets new handle |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1035 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_UnwrapKeyAuthenticated | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | unwrapping_key, | ||
| const Byte * | wrapped_key_ptr, | ||
| Ulong | wrapped_key_len, | ||
| Attribute * | attribute_template_ptr, | ||
| Ulong | attribute_count, | ||
| const Byte * | associated_data_ptr, | ||
| Ulong | associated_data_len, | ||
| ObjectHandle * | key_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_UnwrapKeyAuthenticated unwraps (i.e. decrypts) a wrapped key, creating a new private key or secret key object.
| session | session's handle |
| mechanism_ptr | unwrapping mechanism |
| unwrapping_key | unwrapping key |
| wrapped_key_ptr | wrapped key |
| wrapped_key_len | length of the wrapped key |
| attribute_template_ptr | new key template |
| attribute_count | template length |
| associated_data_ptr | associated data for an AEAD mechanism |
| associated_data_len | length of the associated data |
| key_ptr | gets new key handle |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1089 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_Verify | ( | SessionHandle | session, |
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| const Byte * | signature_ptr, | ||
| Ulong | signature_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_Verify verifies a signature in a single-part operation, where the signature is an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| data_ptr | signed data |
| data_len | length of signed data |
| signature_ptr | signature |
| signature_len | signature length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 796 of file p11.cpp.
References handle_return_value().
|
inline |
C_Verify verifies a signature in a single-part operation, where the signature is an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| data | signed data |
| signature | signature |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 3221 of file p11.h.
References C_Verify(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_VerifyFinal | ( | SessionHandle | session, |
| const Byte * | signature_ptr, | ||
| Ulong | signature_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_VerifyFinal finishes a multiple-part verification operation, checking the signature.
| session | the session's handle |
| signature_ptr | signature to verify |
| signature_len | signature length |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 816 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_VerifyInit initializes a verification operation, where the signature is an appendix to the data, and plaintext cannot be recovered from the signature (e.g. DSA).
| session | the session's handle |
| mechanism_ptr | the verification mechanism |
| key | verification key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 788 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyMessage | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| const Byte * | signature_ptr, | ||
| Ulong | signature_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_VerifyMessage verifies a signature on a message in a single part operation, where the signature is an appendix to the data. C_MessageVerifyInit must previously been called on the session.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| data_ptr | data to sign |
| data_len | data to sign length |
| signature_ptr | signature |
| signature_len | signature length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 889 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyMessageBegin | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_VerifyMessageBegin begins a multiple-part message verification operation, where the signature is an appendix to the message. C_MessageVerifyInit must previously been called on the session.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 907 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyMessageNext | ( | SessionHandle | session, |
| const void * | parameter_ptr, | ||
| Ulong | parameter_len, | ||
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| const Byte * | signature_ptr, | ||
| Ulong | signature_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_VerifyMessageNext continues a multiple-part message verification operation, processing another data part, or finishes a multiple-part message verification operation, checking the signature.
| session | the session's handle |
| parameter_ptr | message specific parameter |
| parameter_len | length of message specific parameter |
| data_ptr | data to sign |
| data_len | data to sign length |
| signature_ptr | signature |
| signature_len | signature length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 916 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyRecover | ( | SessionHandle | session, |
| const Byte * | signature_ptr, | ||
| Ulong | signature_len, | ||
| Byte * | data_ptr, | ||
| Ulong * | data_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_VerifyRecover verifies a signature in a single-part operation, where the data is recovered from the signature.
| session | the session's handle |
| signature_ptr | signature to verify |
| signature_len | signature length |
| data_ptr | gets signed data |
| data_len_ptr | gets signed data len |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 834 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyRecoverInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_VerifyRecoverInit initializes a signature verification operation, where the data is recovered from the signature.
| session | the session's handle |
| mechanism_ptr | the verification mechanism |
| key | verification key |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 825 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifySignature | ( | SessionHandle | session, |
| const Byte * | data_ptr, | ||
| Ulong | data_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_VerifySignature verifies a signature in a single-part operation, where the signature is an appendix to the data.
| session | the session's handle |
| data_ptr | signed data |
| data_len | length of signed data |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 857 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifySignatureFinal | ( | SessionHandle | session, |
| ReturnValue * | return_value = ThrowException ) |
C_VerifySignatureFinal finishes a multiple-part verification operation, checking the signature.
| session | the session's handle |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 874 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifySignatureInit | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | key, | ||
| const Byte * | signature_ptr, | ||
| Ulong | signature_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_VerifySignatureInit initializes a verification operation, where the signature is included as part of the initialization.
| session | the session's handle |
| mechanism_ptr | the verification mechanism |
| key | verification key |
| signature_ptr | signature |
| signature_len | signature length |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 845 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifySignatureUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| ReturnValue * | return_value = ThrowException ) |
C_VerifySignatureUpdate continues a multiple-part verification operation, processing another data part.
| session | the session's handle |
| part_ptr | signed data |
| part_len | length of signed data |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 865 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_VerifyUpdate | ( | SessionHandle | session, |
| const Byte * | part_ptr, | ||
| Ulong | part_len, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_VerifyUpdate continues a multiple-part verification operation, where the signature is an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| part_ptr | signed data |
| part_len | length of signed data |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 808 of file p11.cpp.
References handle_return_value().
|
inline |
C_VerifyUpdate continues a multiple-part verification operation, where the signature is an appendix to the data, and plaintext cannot be recovered from the signature.
| session | the session's handle |
| part | signed data |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 3268 of file p11.h.
References C_VerifyUpdate(), and Botan::PKCS11::ThrowException.
| bool Botan::PKCS11::LowLevel::C_WaitForSlotEvent | ( | Flags | flags, |
| SlotId * | slot_ptr, | ||
| void * | reserved, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_WaitForSlotEvent waits for a slot event (token insertion, removal, etc.) to occur.
| flags | blocking/nonblocking flag |
| slot_ptr | location that receives the slot ID |
| reserved | reserved. Should be nullptr |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 167 of file p11.cpp.
References Botan::PKCS11::flags(), and handle_return_value().
| bool Botan::PKCS11::LowLevel::C_WrapKey | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | wrapping_key, | ||
| ObjectHandle | key, | ||
| Byte * | wrapped_key_ptr, | ||
| Ulong * | wrapped_key_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_WrapKey wraps (i.e., encrypts) a key.
| session | the session's handle |
| mechanism_ptr | the wrapping mechanism |
| wrapping_key | wrapping key |
| key | key to be wrapped |
| wrapped_key_ptr | gets wrapped key |
| wrapped_key_len_ptr | gets wrapped key size |
| return_value | default value (ThrowException): throw exception on error. if a non-NULL pointer is passed: return_value receives the return value of the PKCS #11 function and no exception is thrown. At least the following PKCS #11 return values may be returned:
|
Definition at line 1022 of file p11.cpp.
References handle_return_value().
| bool Botan::PKCS11::LowLevel::C_WrapKeyAuthenticated | ( | SessionHandle | session, |
| const Mechanism * | mechanism_ptr, | ||
| ObjectHandle | wrapping_key, | ||
| ObjectHandle | key, | ||
| const Byte * | associated_data_ptr, | ||
| Ulong | associated_data_len, | ||
| Byte * | wrapped_key_ptr, | ||
| Ulong * | wrapped_key_len_ptr, | ||
| ReturnValue * | return_value = ThrowException ) const |
C_WrapKeyAuthenticated wraps (i.e. encrypts) a private or secret key.
| session | session's handle |
| mechanism_ptr | wrapping mechanism |
| wrapping_key | wrapping key |
| key | key to be wrapped |
| associated_data_ptr | associated data for an AEAD mechanism |
| associated_data_len | length of the associated data |
| wrapped_key_ptr | gets the wrapped key |
| wrapped_key_len_ptr | gets the length of the wrapped key |
| return_value | default value (ThrowException): throw exception on error |
Definition at line 1068 of file p11.cpp.
References handle_return_value().
| FunctionList * Botan::PKCS11::LowLevel::get_functions | ( | ) | const |
|
inline |
Definition at line 3999 of file p11.h.
References get_interface().
Referenced by C_GetInterface(), and get_interface().
|
staticprotected |
it is possible for an application to inherit from LowLevel in order to implement wrappers for vendor specific extensions using the same error handling mechanisms as the rest of the library.
| function_result | Return value of the PKCS11 module function |
| return_value | if (ThrowException) is passed the function throws an exception, otherwise if a non-NULL pointer is passed: return_value receives the return value of the PKCS#11 function and no exception is thrown. |
Definition at line 27 of file p11.cpp.
References Botan::PKCS11::OK, and Botan::PKCS11::ThrowException.
Referenced by C_AsyncComplete(), C_AsyncGetID(), C_AsyncJoin(), C_CancelFunction(), C_CloseAllSessions(), C_CloseSession(), C_CopyObject(), C_CreateObject(), C_DecapsulateKey(), C_Decrypt(), C_DecryptDigestUpdate(), C_DecryptFinal(), C_DecryptInit(), C_DecryptMessage(), C_DecryptMessageBegin(), C_DecryptMessageNext(), C_DecryptUpdate(), C_DecryptVerifyUpdate(), C_DeriveKey(), C_DestroyObject(), C_Digest(), C_DigestEncryptUpdate(), C_DigestFinal(), C_DigestInit(), C_DigestKey(), C_DigestUpdate(), C_EncapsulateKey(), C_Encrypt(), C_EncryptFinal(), C_EncryptInit(), C_EncryptMessage(), C_EncryptMessageBegin(), C_EncryptMessageNext(), C_EncryptUpdate(), C_Finalize(), C_FindObjects(), C_FindObjectsFinal(), C_FindObjectsInit(), C_GenerateKey(), C_GenerateKeyPair(), C_GenerateRandom(), C_GetAttributeValue(), C_GetFunctionList(), C_GetFunctionStatus(), C_GetInfo(), C_GetInterface(), C_GetInterfaceList(), C_GetMechanismInfo(), C_GetMechanismList(), C_GetObjectSize(), C_GetOperationState(), C_GetSessionInfo(), C_GetSessionValidationFlags(), C_GetSlotInfo(), C_GetSlotList(), C_GetTokenInfo(), C_Initialize(), C_InitPIN(), C_InitToken(), C_Login(), C_LoginUser(), C_Logout(), C_MessageDecryptFinal(), C_MessageDecryptInit(), C_MessageEncryptFinal(), C_MessageEncryptInit(), C_MessageSignFinal(), C_MessageSignInit(), C_MessageVerifyFinal(), C_MessageVerifyInit(), C_OpenSession(), C_SeedRandom(), C_SessionCancel(), C_SetAttributeValue(), C_SetOperationState(), C_SetPIN(), C_Sign(), C_SignEncryptUpdate(), C_SignFinal(), C_SignInit(), C_SignMessage(), C_SignMessageBegin(), C_SignMessageNext(), C_SignRecover(), C_SignRecoverInit(), C_SignUpdate(), C_UnwrapKey(), C_UnwrapKeyAuthenticated(), C_Verify(), C_VerifyFinal(), C_VerifyInit(), C_VerifyMessage(), C_VerifyMessageBegin(), C_VerifyMessageNext(), C_VerifyRecover(), C_VerifyRecoverInit(), C_VerifySignature(), C_VerifySignatureFinal(), C_VerifySignatureInit(), C_VerifySignatureUpdate(), C_VerifyUpdate(), C_WaitForSlotEvent(), C_WrapKey(), and C_WrapKeyAuthenticated().