Skip to main content

capsule_library/signers/
mod.rs

1//! Desktop TPM 2.0 [`HardwareSigner`](capsule_core::crypto::keys::HardwareSigner)
2//! implementations. They hold an open TPM context and persistent key handles, which is device
3//! state, so they live here rather than in the stateless core that defines the trait.
4
5// The Windows TPM 2.0 `HardwareSigner` over TBS. The pure wire codec compiles on
6// any host under `cfg(test)` (host-runnable mock tests); the TBS transport + signer are Windows
7// only. Unlike `tpm` (the tss-esapi Linux reference), TBS needs no external crate — it links
8// `tbs.dll` via `windows-sys`.
9pub(crate) mod tbs;
10// The tss-esapi reference signer: off by default and never built in CI, because it links the
11// system `libtss2` and needs a real or software TPM to exercise.
12#[cfg(feature = "tpm")]
13pub(crate) mod tpm;
14
15#[cfg(windows)]
16pub use tbs::TbsTpmSigner;
17#[cfg(feature = "tpm")]
18pub use tpm::TpmSigner;