pub enum CommitVerificationError {
UnsignedCommit,
GpgNotSupported,
SshSigParseFailed(String),
UnsupportedKeyType {
found: String,
},
NamespaceMismatch {
expected: String,
found: String,
},
HashAlgorithmUnsupported(String),
SignatureInvalid,
UnknownSigner,
CommitParseFailed(String),
}Expand description
Errors from commit signature parsing and verification.
Usage:
ⓘ
match result {
Err(CommitVerificationError::UnsignedCommit) => { /* no signature */ }
Err(CommitVerificationError::SignatureInvalid) => { /* bad sig */ }
Ok(verified) => { /* success */ }
}Variants§
UnsignedCommit
The commit has no signature at all.
GpgNotSupported
The commit uses a GPG signature, which is not supported.
SshSigParseFailed(String)
The SSHSIG envelope could not be parsed.
UnsupportedKeyType
The SSH key type is not Ed25519.
NamespaceMismatch
The SSHSIG namespace does not match the expected value.
HashAlgorithmUnsupported(String)
The hash algorithm in the SSHSIG envelope is not supported.
SignatureInvalid
The Ed25519 signature did not verify against the signed data.
UnknownSigner
The signer’s public key is not in the allowed keys list.
CommitParseFailed(String)
The raw commit object could not be parsed.
Trait Implementations§
Source§impl AuthsErrorInfo for CommitVerificationError
impl AuthsErrorInfo for CommitVerificationError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Returns a unique error code string for this error variant.
Source§fn suggestion(&self) -> Option<&'static str>
fn suggestion(&self) -> Option<&'static str>
Returns an optional actionable suggestion for resolving the error.
Source§impl Debug for CommitVerificationError
impl Debug for CommitVerificationError
Source§impl Display for CommitVerificationError
impl Display for CommitVerificationError
Source§impl Error for CommitVerificationError
impl Error for CommitVerificationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CommitVerificationError
impl RefUnwindSafe for CommitVerificationError
impl Send for CommitVerificationError
impl Sync for CommitVerificationError
impl Unpin for CommitVerificationError
impl UnsafeUnpin for CommitVerificationError
impl UnwindSafe for CommitVerificationError
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