pub enum VerificationMode {
Cosign,
Sha256Only,
StrictCosignRequired,
}Expand description
How the upgrade checksum file was verified. Surfaced in the structured
UpgradeOutput payload so consumers (CI, alerting) can detect when an
upgrade silently fell back to SHA256-only and react.
Cosign— full cosign signature verified against the release’s bundle + public key. Strongest guarantee: a publisher-compromise attacker without the cosign private key cannot forge a passing release.Sha256Only— cosign bundle, public key, or thecosignCLI was unavailable; verification fell through tochecksums.txtSHA256 comparison only. Trusts the GitHub Releases publisher chain.StrictCosignRequired— strict cosign mode was requested by the caller (--require-cosign/CFGD_REQUIRE_COSIGN=1) and verification succeeded under that policy. Distinct fromCosignso audit consumers can tell apart “strict was demanded” from “strict happened by accident.”
JSON wire values are hyphenated (cosign, sha256-only,
strict-cosign-required) — chosen for legibility in structured payloads.
Variants spell the rename out per-variant rather than via a blanket
rename_all because the workspace audit gate forbids the blanket form.
Variants§
Implementations§
Source§impl VerificationMode
impl VerificationMode
Sourcepub fn as_wire_str(self) -> &'static str
pub fn as_wire_str(self) -> &'static str
The wire/JSON form of the mode, matching the per-variant serde renames.
Used by callers that emit ad-hoc JSON payloads (e.g. the upgrade CLI)
without round-tripping through serde_json::to_value.
Trait Implementations§
Source§impl Clone for VerificationMode
impl Clone for VerificationMode
Source§fn clone(&self) -> VerificationMode
fn clone(&self) -> VerificationMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerificationMode
impl Debug for VerificationMode
Source§impl<'de> Deserialize<'de> for VerificationMode
impl<'de> Deserialize<'de> for VerificationMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VerificationMode
impl PartialEq for VerificationMode
Source§fn eq(&self, other: &VerificationMode) -> bool
fn eq(&self, other: &VerificationMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for VerificationMode
impl Serialize for VerificationMode
impl Copy for VerificationMode
impl Eq for VerificationMode
impl StructuralPartialEq for VerificationMode
Auto Trait Implementations§
impl Freeze for VerificationMode
impl RefUnwindSafe for VerificationMode
impl Send for VerificationMode
impl Sync for VerificationMode
impl Unpin for VerificationMode
impl UnsafeUnpin for VerificationMode
impl UnwindSafe for VerificationMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.