Struct yubihsm::session::Session [−][src]
pub struct Session<C = HttpConnector> where
C: Connector, { /* fields omitted */ }
Encrypted session with the YubiHSM2
Generic over connector types in case a different one needs to be swapped
in, which is primarily useful for substituting the MockHSM
.
Methods
impl Session<HttpConnector>
[src]
impl Session<HttpConnector>
pub fn create(
connector_config: HttpConfig,
auth_key_id: ObjectId,
static_keys: StaticKeys,
reconnect: bool
) -> Result<Self, SessionError>
[src]
pub fn create(
connector_config: HttpConfig,
auth_key_id: ObjectId,
static_keys: StaticKeys,
reconnect: bool
) -> Result<Self, SessionError>
Open a new session to the HSM, authenticating with the given keypair
pub fn create_from_password(
connector_config: HttpConfig,
auth_key_id: ObjectId,
password: &str,
reconnect: bool
) -> Result<Self, SessionError>
[src]
pub fn create_from_password(
connector_config: HttpConfig,
auth_key_id: ObjectId,
password: &str,
reconnect: bool
) -> Result<Self, SessionError>
Open a new session to the HSM, authenticating with a given password
impl<C: Connector> Session<C>
[src]
impl<C: Connector> Session<C>
pub fn new(
connector: C,
auth_key_id: ObjectId,
static_keys: StaticKeys,
reconnect: bool
) -> Result<Self, SessionError>
[src]
pub fn new(
connector: C,
auth_key_id: ObjectId,
static_keys: StaticKeys,
reconnect: bool
) -> Result<Self, SessionError>
Create a new encrypted session using the given connector, YubiHSM2 auth key ID, and static identity keys
pub fn id(&self) -> SessionId
[src]
pub fn id(&self) -> SessionId
Get the current session ID
pub fn connector_status(&mut self) -> Result<ConnectorStatus, SessionError>
[src]
pub fn connector_status(&mut self) -> Result<ConnectorStatus, SessionError>
Request current yubihsm-connector status