Skip to main content

basil_core/core/
mod.rs

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