Skip to main content

basil_core/core/
mod.rs

1//! Core broker state, policy, backends, audit, and reconciliation.
2
3pub mod actor;
4pub mod audit;
5pub mod backend;
6pub mod capability;
7pub mod catalog;
8pub mod crypto_provider;
9pub mod decision;
10pub mod ed25519_sign;
11pub mod event;
12pub mod manager;
13pub mod minter;
14pub mod ml_dsa_sign;
15pub mod ml_kem_envelope;
16pub mod peer;
17pub mod reconcile;
18pub mod reload;
19pub mod revocation;
20pub mod seal;
21pub mod state;
22pub mod x25519_seal;
23
24#[cfg(feature = "tpm2")]
25pub mod identity;
26
27/// Whether a system TPM is present (resource-manager or raw device node).
28///
29/// Ungated probe shared by the `tpm2` local-identity scaffolding and the
30/// `unlock-tpm` sealed-bundle slot, so neither feature needs to enable the
31/// other. Mirrors `brightnexus-platform`'s `tpm_available()`.
32#[must_use]
33pub fn tpm_device_present() -> bool {
34    std::path::Path::new("/dev/tpmrm0").exists() || std::path::Path::new("/dev/tpm0").exists()
35}