pub struct WebOfTrustMode {
flow_amount: TrustAmountFlow,
partial_amount: TrustAmountPartial,
roots: HashSet<WebOfTrustRoot>,
artifact_verifier_identity_domain_matches: HashSet<DomainName>,
}Expand description
Settings for the “Web of Trust” verification mode.
Fields§
§flow_amount: TrustAmountFlowThe required flow amount for authentication for a target identity.
partial_amount: TrustAmountPartialThe numerical trust amount of a partially trusted introducer.
roots: HashSet<WebOfTrustRoot>The trust roots for the “Web of Trust”.
If a trust root defined in this list cannot be found in the set of trust anchors, a warning is emitted.
§Note
If this list is empty, all trust-anchors found for a specific context are considered to be trust roots. If this list is empty and no trust-anchors are found, no artifact verifiers will be trusted.
artifact_verifier_identity_domain_matches: HashSet<DomainName>The identity of an artifact verifier must match one of the domains.
Implementations§
Source§impl WebOfTrustMode
impl WebOfTrustMode
Sourcepub fn new(
flow_amount: TrustAmountFlow,
partial_amount: TrustAmountPartial,
roots: HashSet<WebOfTrustRoot>,
artifact_verifier_identity_domain_matches: HashSet<DomainName>,
) -> Self
pub fn new( flow_amount: TrustAmountFlow, partial_amount: TrustAmountPartial, roots: HashSet<WebOfTrustRoot>, artifact_verifier_identity_domain_matches: HashSet<DomainName>, ) -> Self
Creates a new WebOfTrustMode.
Sourcepub(crate) fn from_config_with_defaults(
config: &ConfigWebOfTrustMode,
defaults: &WebOfTrustMode,
) -> Self
pub(crate) fn from_config_with_defaults( config: &ConfigWebOfTrustMode, defaults: &WebOfTrustMode, ) -> Self
Creates a new WebOfTrustMode from a ConfigWebOfTrustMode and explicit defaults.
§Note
If found, the trust amount of each WebOfTrustRoot created from the config is
derived from the defaults as well.
Otherwise, the implicit default is used instead.
Sourcepub fn flow_amount(&self) -> TrustAmountFlow
pub fn flow_amount(&self) -> TrustAmountFlow
Returns the TrustAmountFlow
Sourcepub fn partial_amount(&self) -> TrustAmountPartial
pub fn partial_amount(&self) -> TrustAmountPartial
Returns the TrustAmountPartial
Sourcepub fn roots(&self) -> &HashSet<WebOfTrustRoot>
pub fn roots(&self) -> &HashSet<WebOfTrustRoot>
Returns a reference to the list of WebOfTrustRoot entries.
Sourcepub fn root_trust_amount(
&self,
fingerprint: &OpenpgpFingerprint,
) -> Option<TrustAmountRoot>
pub fn root_trust_amount( &self, fingerprint: &OpenpgpFingerprint, ) -> Option<TrustAmountRoot>
Returns the TrustAmountRoot for a root if it matches the provided fingerprint.
Sourcepub fn artifact_verifier_identity_domain_matches(&self) -> &HashSet<DomainName>
pub fn artifact_verifier_identity_domain_matches(&self) -> &HashSet<DomainName>
Returns a reference to the list of DomainName entries.
Trait Implementations§
Source§impl Clone for WebOfTrustMode
impl Clone for WebOfTrustMode
Source§fn clone(&self) -> WebOfTrustMode
fn clone(&self) -> WebOfTrustMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebOfTrustMode
impl Debug for WebOfTrustMode
Source§impl Default for WebOfTrustMode
impl Default for WebOfTrustMode
Source§impl<'de> Deserialize<'de> for WebOfTrustMode
impl<'de> Deserialize<'de> for WebOfTrustMode
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>,
Source§impl Display for WebOfTrustMode
impl Display for WebOfTrustMode
Source§impl PartialEq for WebOfTrustMode
impl PartialEq for WebOfTrustMode
Source§impl Serialize for WebOfTrustMode
impl Serialize for WebOfTrustMode
impl Eq for WebOfTrustMode
impl StructuralPartialEq for WebOfTrustMode
Auto Trait Implementations§
impl Freeze for WebOfTrustMode
impl RefUnwindSafe for WebOfTrustMode
impl Send for WebOfTrustMode
impl Sync for WebOfTrustMode
impl Unpin for WebOfTrustMode
impl UnwindSafe for WebOfTrustMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more