Trait yubihsm::adapter::Adapter[][src]

pub trait Adapter: Sized + Send + Sync {
    type Config: Debug + Default + Send + Sync;
    fn open(config: &Self::Config) -> Result<Self, AdapterError>;
fn healthcheck(&self) -> Result<(), AdapterError>;
fn serial_number(&self) -> Result<SerialNumber, AdapterError>;
fn send_message(
        &self,
        uuid: Uuid,
        msg: Vec<u8>
    ) -> Result<Vec<u8>, AdapterError>; }

Adapters for communicating with the YubiHSM2

Associated Types

Configuration options for this adapter

Required Methods

Open a connection to this adapter

Are we able to send/receive messages to/from the HSM?

Get the serial number for the current YubiHSM2 (if available)

Send a command message to the HSM, then read and return the response

Implementors