pub struct TimeAttestation {
pub authority: String,
pub artifact_hash: String,
pub attested_at: DateTime<Utc>,
pub external_anchor: Vec<u8>,
pub signature: Vec<u8>,
}Expand description
A time authority’s attestation over an artifact.
Fields§
The time authority’s identifier.
artifact_hash: StringThe artifact’s canonical payload hash (hex).
attested_at: DateTime<Utc>When the authority attests the artifact existed.
external_anchor: Vec<u8>The external anchor: serialized OpenTimestamps proof (or equivalent) binding the hash to an irrefutable time source.
signature: Vec<u8>The time authority’s signature over the attestation body.
Implementations§
Source§impl TimeAttestation
impl TimeAttestation
Sourcepub fn signing_bytes(&self) -> SignatifResult<Vec<u8>>
pub fn signing_bytes(&self) -> SignatifResult<Vec<u8>>
Sourcepub fn verify(
&self,
authority_key: &[u8],
verifier: &dyn SignatureVerifier,
) -> SignatifResult<()>
pub fn verify( &self, authority_key: &[u8], verifier: &dyn SignatureVerifier, ) -> SignatifResult<()>
Verify the attestation: the authority’s signature, and that an external anchor is present (the anchor itself is verified against the time source by the OTS layer).
§Errors
Signature or anchor errors.
Trait Implementations§
Source§impl Clone for TimeAttestation
impl Clone for TimeAttestation
Source§fn clone(&self) -> TimeAttestation
fn clone(&self) -> TimeAttestation
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 TimeAttestation
impl Debug for TimeAttestation
Source§impl<'de> Deserialize<'de> for TimeAttestation
impl<'de> Deserialize<'de> for TimeAttestation
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
Auto Trait Implementations§
impl Freeze for TimeAttestation
impl RefUnwindSafe for TimeAttestation
impl Send for TimeAttestation
impl Sync for TimeAttestation
impl Unpin for TimeAttestation
impl UnsafeUnpin for TimeAttestation
impl UnwindSafe for TimeAttestation
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