Skip to main content

Crate cosmian_pkcs11_verify

Crate cosmian_pkcs11_verify 

Source
Expand description

Shared PKCS#11 helper functions used by both the cosmian_pkcs11_verify binary and the integration test suite.

The binary (main.rs) imports these via use cosmian_pkcs11_verify::*. The integration tests live in tests.rs and reference them via crate::.

Constants§

MAX_OBJECTS
Maximum number of PKCS#11 object handles requested in a single C_FindObjects call.
OBJECT_CLASSES
PKCS#11 object classes to enumerate in order.

Functions§

call_decrypt_aes_cbc_pad
Decrypt ciphertext using the AES-CBC-PAD mechanism with a zero 16-byte IV.
call_encrypt_aes_cbc_pad
Encrypt plaintext using the AES-CBC-PAD mechanism with a zero 16-byte IV.
call_find_objects
call_generate_aes_key
Generate an AES-256 key in the token with the given label.
call_get_function_list
call_get_slot_list
call_login
call_open_session
check_rv
ckr_name
Return a human-readable name for a CK_RV return value.
count_objects_by_class
Run one C_FindObjectsInitC_FindObjects* → C_FindObjectsFinal cycle for a single object class and return the total number of matching handles.

Type Aliases§

GetFunctionListFn