yubihsm 0.26.0

Pure Rust client for YubiHSM2 devices with support for HTTP and USB-based access to the device. Supports most HSM functionality including ECDSA, Ed25519, HMAC, and RSA.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Trait shared across all methods for connecting to the YubiHSM2

use crate::connector;
use uuid::Uuid;

/// Connections to the HSM
pub trait Connection: Send + Sync {
    /// Send a command message to the HSM, then read and return the response
    fn send_message(
        &self,
        uuid: Uuid,
        msg: connector::Message,
    ) -> Result<connector::Message, connector::Error>;
}