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_FindObjectscall. - OBJECT_
CLASSES - PKCS#11 object classes to enumerate in order.
Functions§
- call_
decrypt_ aes_ cbc_ pad - Decrypt
ciphertextusing the AES-CBC-PAD mechanism with a zero 16-byte IV. - call_
encrypt_ aes_ cbc_ pad - Encrypt
plaintextusing 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_RVreturn value. - count_
objects_ by_ class - Run one
C_FindObjectsInit→C_FindObjects* →C_FindObjectsFinalcycle for a single object class and return the total number of matching handles.