[][src]Struct ctclient::SignedCertificateTimestamp

pub struct SignedCertificateTimestamp {
    pub log_id: [u8; 32],
    pub timestamp: u64,
    pub extensions_data: Vec<u8>,
    pub entry: SctEntry,
    pub signature_algorithm: SignatureAlgorithm,
    pub raw_signature: Vec<u8>,
}

An unverified Signed Certificate Timestamp (SCT).

Fields

log_id: [u8; 32]timestamp: u64extensions_data: Vec<u8>entry: SctEntrysignature_algorithm: SignatureAlgorithmraw_signature: Vec<u8>

Raw signature encoded in ASN.1

Implementations

impl SignedCertificateTimestamp[src]

pub fn from_cert_sct_extension(
    cert: &X509Ref,
    issuer: &X509Ref
) -> Result<Vec<SignedCertificateTimestamp>, Error>
[src]

Extract a list of SCTs from the SCT List extension of the given openssl-parsed certificate, if the extension is there.

If the certificate does not contain the extension, Ok(vec![]) is returned.

pub fn derive_leaf_hash(&self) -> [u8; 32][src]

Derive the corresponding Merkle leaf hash from this SCTs.

Can be used to check inclusion, for example.

pub fn verify(&self, log_public_key: &PKey<Public>) -> Result<(), Error>[src]

Check the signature in this SCT.

To get the log public key, lookup the log with self.log_id by e.g. using crate::google_log_list::LogList::find_by_id.

Trait Implementations

impl Clone for SignedCertificateTimestamp[src]

impl Debug for SignedCertificateTimestamp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.