pub struct KeyCertificate {
pub statement: KeyCertStatement,
pub signatures: Vec<RootSignature>,
}Expand description
A KeyCertStatement and the root signatures over it
Fields§
§statement: KeyCertStatement§signatures: Vec<RootSignature>Implementations§
Source§impl KeyCertificate
impl KeyCertificate
Sourcepub fn unsigned(statement: KeyCertStatement) -> Self
pub fn unsigned(statement: KeyCertStatement) -> Self
statement, not yet signed by anyone
Sourcepub fn with(self, signature: RootSignature) -> Self
pub fn with(self, signature: RootSignature) -> Self
This certificate, plus signature
Sourcepub fn verify(&self, roots: &RootSet) -> Result<(), CertificateError>
pub fn verify(&self, roots: &RootSet) -> Result<(), CertificateError>
At least threshold distinct keys of roots
signed this statement.
A signature by a key outside roots, a second one by the same key,
or one that does not verify is ignored rather than fatal: a future
root set may overlap this one.
Sourcepub fn verify_for(
&self,
expected: &KeyCertStatement,
roots: &RootSet,
) -> Result<(), CertificateError>
pub fn verify_for( &self, expected: &KeyCertStatement, roots: &RootSet, ) -> Result<(), CertificateError>
verify, and the statement is exactly expected —
which the verifier derives from the chain, never from the
certificate
Trait Implementations§
Source§impl Clone for KeyCertificate
impl Clone for KeyCertificate
Source§fn clone(&self) -> KeyCertificate
fn clone(&self) -> KeyCertificate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyCertificate
impl Debug for KeyCertificate
Source§impl<'de> Deserialize<'de> for KeyCertificate
impl<'de> Deserialize<'de> for KeyCertificate
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyCertificate
Source§impl PartialEq for KeyCertificate
impl PartialEq for KeyCertificate
Source§impl Serialize for KeyCertificate
impl Serialize for KeyCertificate
impl StructuralPartialEq for KeyCertificate
Auto Trait Implementations§
impl Freeze for KeyCertificate
impl RefUnwindSafe for KeyCertificate
impl Send for KeyCertificate
impl Sync for KeyCertificate
impl Unpin for KeyCertificate
impl UnsafeUnpin for KeyCertificate
impl UnwindSafe for KeyCertificate
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
Mutably borrows from an owned value. Read more