pub enum VerifyError {
Show 14 variants
CosignNotFound {
searched: Vec<PathBuf>,
},
CosignFailed {
stderr: String,
},
Io(String),
PolicyRequiresSig {
owner: String,
},
AssetIncomplete {
present: &'static str,
missing: &'static str,
},
TrustedKeysParse {
path: PathBuf,
reason: String,
},
IdentityRegexpInvalid {
got: String,
reason: String,
},
CertParseFailed(String),
UnsupportedKey(String),
SignatureDecodeFailed(String),
SignatureMismatch,
IdentityNotFound,
IdentityMismatch {
found: String,
expected_regex: String,
},
IssuerMismatch {
found: String,
expected: String,
},
}Expand description
Errors surfaced by crate::verify::verify_plugin_signature
and the trusted_keys.toml loader.
Variants§
CosignNotFound
cosign binary not found on PATH or in any well-known
location, and no cosign_binary override was configured.
CosignFailed
cosign verify-blob exited with a non-zero status.
Fields
Io(String)
IO error during signature/cert/bundle download or local process spawning.
PolicyRequiresSig
Trust policy is Require but the resolved release has no
.sig + .cert assets.
AssetIncomplete
Release ships one half of the signing material but not the
other (e.g. .sig without .cert). Implies a publish
convention violation upstream; rejected outside Ignore.
Fields
TrustedKeysParse
trusted_keys.toml failed to parse.
Fields
IdentityRegexpInvalid
One of the [[authors]] entries declared an
identity_regexp that does not compile under the Rust
regex engine.
CertParseFailed(String)
PEM/DER certificate could not be parsed.
UnsupportedKey(String)
Certificate is well-formed but does not carry an ECDSA-P256 public key — the only key type cosign uses today.
SignatureDecodeFailed(String)
Signature file could not be base64-decoded or DER-parsed.
SignatureMismatch
Signature did not verify against the certificate’s public
key over SHA-256(blob). Either the blob, the
certificate, or the signature has been tampered with.
IdentityNotFound
Certificate has no Subject Alternative Name URIs / emails — Fulcio always emits at least one, so an empty SAN almost certainly means we got handed the wrong cert.
IdentityMismatch
Certificate’s SAN entries do not match the policy’s
identity_regexp.
Fields
IssuerMismatch
Certificate’s Fulcio OIDC-issuer extension does not match the policy.
Trait Implementations§
Source§impl Debug for VerifyError
impl Debug for VerifyError
Source§impl Display for VerifyError
impl Display for VerifyError
Source§impl Error for VerifyError
impl Error for VerifyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for VerifyError
impl RefUnwindSafe for VerifyError
impl Send for VerifyError
impl Sync for VerifyError
impl Unpin for VerifyError
impl UnsafeUnpin for VerifyError
impl UnwindSafe for VerifyError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.