NAME
Crypt::HSM::Provider - A PKCS11 provider
VERSION
version 0.019
SYNOPSIS
my $hsm = Crypt::HSM->load('/usr/lib/pkcs11/libsofthsm2.so');
my ($slot) = $hsm->slots;
my $session = $slot->open_session;
$session->login('user', '1234');
DESCRIPTION
This module interfaces with any PKCS11 interface to use its cryptography.
METHODS
slots($available = 1)
This lists the slots of this interface as Crypt::HSM::Slot. If $available
is true only slots with a token available will be listed.
slot($identifier)
This returns a Crypt::HSM::Slot for the slot with the given identifier.
info()
This returns a hash with information about the HSM.
wait_for_event(@flags)
This will wait until an event happens (e.g. a token becomes available in a slot). It currently supports only one flag 'dont-block'
. It returns a Crypt::HSM::Slot, or if 'dont-block'
is passed and no event is pending it returns undef
.
AUTHOR
Leon Timmermans <fawaka@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.