#[non_exhaustive]pub enum DegradeReason {
NoHardwarePresent,
ProbeIndeterminate {
detail: String,
},
HardwareUnusable {
detail: String,
},
NotRequested,
BlobNotWrapped,
}Expand description
Why a keystore is software-wrapped rather than hardware-bound.
Always present alongside ProtectionTier::Software — a degrade is never
reportable without its cause.
#[non_exhaustive]: new ways to fail to bind will be discovered, and a
consumer should treat an unfamiliar reason as “not hardware-bound” rather than
fail to compile.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoHardwarePresent
The host was inspected successfully and has no usable hardware trusted component. This is a confident negative.
ProbeIndeterminate
The host could not be inspected: the probe errored, timed out, or returned nothing intelligible. We do not know whether hardware exists.
Distinct from NoHardwarePresent on purpose.
Under any policy stricter than HardwarePolicy::Optional this is an
error rather than a degrade (fail closed) — see
HardwarePolicy.
HardwareUnusable
Hardware was detected but failed its self-test, so it cannot be trusted to wrap or later unwrap key material.
A probe that says “present” is a claim, not a proof; this reason exists because the claim is verified by use and can be refuted.
NotRequested
No hardware binding was attempted — the caller supplied no provider or explicitly opted out.
BlobNotWrapped
This particular blob is not hardware-wrapped, whatever the host is capable of.
The reason a keystore written before hardware binding existed — or written on a host that had none — reports a software tier even on a hardware-capable machine. Only rewriting the blob on such a host binds it; a capable host does not retroactively protect bytes already at rest.
Trait Implementations§
Source§impl Clone for DegradeReason
impl Clone for DegradeReason
Source§fn clone(&self) -> DegradeReason
fn clone(&self) -> DegradeReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more