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
//! Trait for YubiHSM2 interfaces which can be connected to

use crate::connector::{self, Connection};

/// Connectors which create `Connection` objects to the HSM
pub trait Connectable: Send + Sync {
    /// Make a clone of this connectable as boxed trait object
    fn box_clone(&self) -> Box<dyn Connectable>;

    /// Open a connection to the HSM using this `Connector`
    fn connect(&self) -> Result<Box<dyn Connection>, connector::Error>;
}