#[non_exhaustive]pub enum VerificationOutcome {
Verified {
badge: Badge,
matched_fingerprint: CertFingerprint,
},
NotAnsAgent {
fqdn: String,
},
InvalidStatus {
status: BadgeStatus,
badge: Badge,
},
FingerprintMismatch {
expected: String,
actual: String,
badge: Badge,
},
HostnameMismatch {
expected: String,
actual: String,
badge: Badge,
},
AnsNameMismatch {
expected: String,
actual: String,
badge: Badge,
},
DnsError(DnsError),
TlogError(TlogError),
CertError(CryptoError),
ParseError(ParseError),
DaneError(DaneError),
}Expand description
Result of a verification operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Verified
Verification passed.
Fields
matched_fingerprint: CertFingerprintThe fingerprint that matched.
NotAnsAgent
Not an ANS agent (no badge DNS record found).
InvalidStatus
Badge status is invalid for connections.
FingerprintMismatch
Certificate fingerprint does not match badge.
Fields
HostnameMismatch
Hostname does not match badge.
Fields
AnsNameMismatch
ANS name does not match badge (mTLS client verification).
Fields
DnsError(DnsError)
Verification failed due to a DNS error.
TlogError(TlogError)
Verification failed due to a transparency log error.
CertError(CryptoError)
Verification failed due to a certificate error.
ParseError(ParseError)
Verification failed due to a parse error.
DaneError(DaneError)
Verification failed due to a DANE/TLSA error.
Implementations§
Source§impl VerificationOutcome
impl VerificationOutcome
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if verification was successful.
Sourcepub fn is_terminal_status(&self) -> bool
pub fn is_terminal_status(&self) -> bool
Check if the agent is in a terminal status (revoked, expired, etc.).
Returns true for both badge-detected terminal status ([InvalidStatus])
and SCITT-detected terminal status ([ScittError::TerminalStatus] /
[ScittError::AgentTerminal]). Callers should use this instead of
pattern-matching individual variants.
Sourcepub fn is_not_ans_agent(&self) -> bool
pub fn is_not_ans_agent(&self) -> bool
Check if the agent is not registered with ANS.
Sourcepub fn badge(&self) -> Option<&Badge>
pub fn badge(&self) -> Option<&Badge>
Get the badge if verification succeeded or partially completed.
Sourcepub fn into_result(self) -> AnsResult<Badge>
pub fn into_result(self) -> AnsResult<Badge>
Convert to a Result, returning the Badge on success.
For badge-based verification, this is the natural accessor. For
SCITT-verified outcomes that may not carry a badge, prefer
into_scitt_result which returns
Option<Badge> on success.
When the scitt feature is enabled:
ScittVerifiedwith a badge →Ok(badge)ScittVerifiedwithout a badge →Err(Configuration)(useinto_scitt_result()instead)ScittError→Err(Scitt(..))