Struct yubihsm::mockhsm::MockHSM [−][src]
pub struct MockHSM { /* fields omitted */ }
Software simulation of a YubiHSM2
intended for testing
implemented as a yubihsm::Connector
(skipping HTTP transport)
To enable, make sure to build yubihsm.rs with the "mockhsm" feature
Methods
impl MockHSM
[src]
impl MockHSM
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a new MockHSM
pub fn create_session(
auth_key_id: ObjectId,
password: &str
) -> Result<Session<Self>, SessionError>
[src]
pub fn create_session(
auth_key_id: ObjectId,
password: &str
) -> Result<Session<Self>, SessionError>
Create a simulated session with a MockHSM
Trait Implementations
impl Default for MockHSM
[src]
impl Default for MockHSM
impl Connector for MockHSM
[src]
impl Connector for MockHSM
type Config = MockConfig
Configuration options for this connector
fn open(_config: MockConfig) -> Result<Self, ConnectorError>
[src]
fn open(_config: MockConfig) -> Result<Self, ConnectorError>
We don't bother to implement this
fn status(&self) -> Result<Status, ConnectorError>
[src]
fn status(&self) -> Result<Status, ConnectorError>
GET /connector/status returning the result as connector::Status
fn send_command(
&self,
_uuid: Uuid,
body: Vec<u8>
) -> Result<Vec<u8>, ConnectorError>
[src]
fn send_command(
&self,
_uuid: Uuid,
body: Vec<u8>
) -> Result<Vec<u8>, ConnectorError>
POST /connector/api with a given command message and return the response message