Main PKCS11 context. Should usually be unique per application.
pub fn initialize(&self, init_args: CInitializeArgs) -> Result<()>[src]
Initialize the PKCS11 library
Finalize the PKCS11 library. Indicates that the application no longer needs to use PKCS11. The library is also automatically finalized on drop.
Open a new session with no callback set
pub fn get_slots_with_token(&self) -> Result<Vec<Slot>>[src]
Get all slots available with a token
pub fn get_all_slots(&self) -> Result<Vec<Slot>>[src]
Get all slots
Initialize a token
Currently will use an empty label for all tokens.
Instantiate a new context from the path of a PKCS11 dynamic llibrary implementation.
Set the PIN used when logging in sessions. The pin set is the one that is going to be use with all user type specified when logging in. It needs to be changed before calling login with a different user type.
Clear the pin store. Ignore if the pin was not set previously on the slot. Note that the pin will be cleared anyway on drop.
impl !RefUnwindSafe for Pkcs11
impl !UnwindSafe for Pkcs11
type Error = Infallible
The type returned in the event of a conversion error.