pub enum Depth {
Unconstrained,
Limit(usize),
}Expand description
Trust depth.
A certification may include a trust signature subpacket, which specifies that the issuer not only considers the target binding to be correct, but that they are also willing to rely on certifications that the target certificate makes. That is, if Alice designates Bob as a trusted introducer, than if Carol is willing to rely on Alice’s certifications, she should also be willing to rely on Bob’s.
The trust depth is one of two parameters stored in the trust
signature subpacket, and indicates how far that capability may be
delegated. A value of zero means that the certification is
actually a normal certification, and the target is not a trusted
introducer. A value of one means that the target certificate
should be considered a trusted introducer, but it may not further
delegate that capability. A value of two means that the target
certificate should be considered a trusted introducer, and that it
may delegate that capability to another certificate, but they may
not further delegate it. In short, a value of n means that
there may be up to n intervening trusted introducers between the
issuer and the target binding:
- 0: Normal certification.
- 1: Trusted introducer.
- 2: Meta-introducer.
- etc.
A value of 255, the maximum value that can be stored in the OpenPGP data structure, has a special meaning: the issuer does not impose a constraint on the number of delegations.
This data structure does not automatically convert a value of 255
to Depth::Unconstrained; the caller must specify
Depth::Unconstrained explicitly.
Variants§
Implementations§
Source§impl Depth
impl Depth
pub fn new<I>(depth: I) -> Self
Sourcepub fn unconstrained() -> Self
pub fn unconstrained() -> Self
Returns an unconstrained Depth.
Sourcepub fn is_unconstrained(&self) -> bool
pub fn is_unconstrained(&self) -> bool
Returns whether this Depth is unconstrained.
Sourcepub fn can_introduce(&self) -> bool
pub fn can_introduce(&self) -> bool
Returns whether this Depth allows introducing.