pub struct Anchor<'a> { /* private fields */ }Expand description
What the caller trusts, as the trust context named it.
A name and a key, because that is what an anchor is: the certificate it was published in, where there is one, is kept for the report and is not what makes it an anchor. Two anchors with the same name and different keys are two anchors, and a path is built to each.
Implementations§
Source§impl<'a> Anchor<'a>
impl<'a> Anchor<'a>
Sourcepub fn new(name: &'a Name<'a>, key: PublicKeyInfo<'a>) -> Self
pub fn new(name: &'a Name<'a>, key: PublicKeyInfo<'a>) -> Self
An anchor the trust context supplies as a name and a key.
Sourcepub fn from_certificate(certificate: &'a Certificate<'a>) -> Self
pub fn from_certificate(certificate: &'a Certificate<'a>) -> Self
An anchor the trust context supplies as a certificate, whose subject and key it is. The certificate is not part of any path built to it (RFC 5280 6.1), and is kept so a report can name where the anchor came from and so that what it says about the names below it is obeyed.
Sourcepub fn name(&self) -> &'a Name<'a>
pub fn name(&self) -> &'a Name<'a>
The name a certificate issued under this anchor carries as its issuer.
Sourcepub fn key(&self) -> PublicKeyInfo<'a>
pub fn key(&self) -> PublicKeyInfo<'a>
The public key information, as encoded, which is what verifies the signature of the certificate below it.
Sourcepub fn certificate(&self) -> Option<&'a Certificate<'a>>
pub fn certificate(&self) -> Option<&'a Certificate<'a>>
The certificate the anchor was published in, where the trust context had one.