pub struct Pkcs11Config {
pub library_path: Option<PathBuf>,
pub slot_id: Option<u64>,
pub token_label: Option<String>,
pub pin: Option<String>,
pub key_label: Option<String>,
}Expand description
PKCS#11 HSM configuration, sourced from AUTHS_PKCS11_* environment variables.
Args:
library_path: Path to the PKCS#11 shared library (e.g.libsofthsm2.so).slot_id: Numeric slot identifier (mutually exclusive withtoken_label).token_label: Token label for slot lookup (mutually exclusive withslot_id).pin: User PIN for the HSM token.key_label: PKCS#11 object label for the Ed25519 key.
Usage:
ⓘ
let config = Pkcs11Config::from_env();Fields§
§library_path: Option<PathBuf>Path to the PKCS#11 shared library (e.g. libsofthsm2.so).
slot_id: Option<u64>Numeric slot identifier; mutually exclusive with token_label.
token_label: Option<String>Human-readable token label used to locate the slot.
pin: Option<String>User PIN for the token session.
key_label: Option<String>Default key label for signing operations.
Implementations§
Source§impl Pkcs11Config
impl Pkcs11Config
Trait Implementations§
Source§impl Clone for Pkcs11Config
impl Clone for Pkcs11Config
Source§fn clone(&self) -> Pkcs11Config
fn clone(&self) -> Pkcs11Config
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Pkcs11Config
impl Debug for Pkcs11Config
Source§impl Default for Pkcs11Config
impl Default for Pkcs11Config
Source§fn default() -> Pkcs11Config
fn default() -> Pkcs11Config
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Pkcs11Config
impl RefUnwindSafe for Pkcs11Config
impl Send for Pkcs11Config
impl Sync for Pkcs11Config
impl Unpin for Pkcs11Config
impl UnsafeUnpin for Pkcs11Config
impl UnwindSafe for Pkcs11Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more