pub struct PicContinuityPayload {
pub profile: String,
pub root: ContinuityRoot,
pub transitions: Option<Vec<ByteBuf>>,
}Expand description
PIC Continuity COSE payload.
transitions is always semantically present: None (CBOR null) means
settled; a candidate carries exactly one workload-signed PIC Continuity
Transition COSE.
Fields§
§profile: StringPIC profile identifier; must equal crate::PROFILE_0_2.
root: ContinuityRootThe current trusted checkpoint (exact bytes plus digest).
transitions: Option<Vec<ByteBuf>>None (CBOR null) for a settled state; exactly one workload-signed
PIC Continuity Transition COSE (exact bytes) for a candidate.
Implementations§
Source§impl PicContinuityPayload
impl PicContinuityPayload
Sourcepub fn candidate(
exact_pca_bytes: Vec<u8>,
exact_transition_bytes: Vec<u8>,
) -> Self
pub fn candidate( exact_pca_bytes: Vec<u8>, exact_transition_bytes: Vec<u8>, ) -> Self
A candidate Continuity: exactly one proposed transition.
Sourcepub fn is_settled(&self) -> bool
pub fn is_settled(&self) -> bool
true when transitions is null (settled state).
Sourcepub fn require_settled(&self) -> Result<(), RejectReason>
pub fn require_settled(&self) -> Result<(), RejectReason>
For a settled Continuity, transitions must be null.
Sourcepub fn candidate_transition(&self) -> Result<&[u8], RejectReason>
pub fn candidate_transition(&self) -> Result<&[u8], RejectReason>
For a candidate, returns the exact bytes of the single transition.
Sourcepub fn check_root_hash(&self) -> Result<(), RejectReason>
pub fn check_root_hash(&self) -> Result<(), RejectReason>
Recomputes and checks root.pca_hash against the exact root.pca
bytes. Verifiers MUST recompute; the stored digest is never trusted.
Sourcepub fn check_profile(&self) -> Result<(), RejectReason>
pub fn check_profile(&self) -> Result<(), RejectReason>
Rejects the payload unless profile is crate::PROFILE_0_2.
Trait Implementations§
Source§impl Clone for PicContinuityPayload
impl Clone for PicContinuityPayload
Source§fn clone(&self) -> PicContinuityPayload
fn clone(&self) -> PicContinuityPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more