#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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_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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VerificationOutcome
impl !RefUnwindSafe for VerificationOutcome
impl Send for VerificationOutcome
impl Sync for VerificationOutcome
impl Unpin for VerificationOutcome
impl UnsafeUnpin for VerificationOutcome
impl !UnwindSafe for VerificationOutcome
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
Mutably borrows from an owned value. Read more