Struct tlsn_core::session::HandshakeSummary
source · pub struct HandshakeSummary { /* private fields */ }
Expand description
Handshake summary is part of the session header signed by the Notary
Implementations§
source§impl HandshakeSummary
impl HandshakeSummary
sourcepub fn new(
time: u64,
ephemeral_ec_pubkey: PublicKey,
handshake_commitment: Hash
) -> Self
pub fn new( time: u64, ephemeral_ec_pubkey: PublicKey, handshake_commitment: Hash ) -> Self
Creates a new HandshakeSummary
sourcepub fn time(&self) -> u64
pub fn time(&self) -> u64
Time of the TLS session, in seconds since the UNIX epoch.
§Note
This time is not necessarily exactly aligned with the TLS handshake.
sourcepub fn server_public_key(&self) -> &PublicKey
pub fn server_public_key(&self) -> &PublicKey
Returns the server ephemeral public key
sourcepub fn handshake_commitment(&self) -> &Hash
pub fn handshake_commitment(&self) -> &Hash
Returns commitment to the handshake data
sourcepub fn verify(
&self,
data: &Decommitment<HandshakeData>
) -> Result<(), HandshakeVerifyError>
pub fn verify( &self, data: &Decommitment<HandshakeData> ) -> Result<(), HandshakeVerifyError>
Verifies that the provided handshake data matches this handshake summary
Trait Implementations§
source§impl Clone for HandshakeSummary
impl Clone for HandshakeSummary
source§fn clone(&self) -> HandshakeSummary
fn clone(&self) -> HandshakeSummary
Returns a copy of the value. Read more
1.0.0 · 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 HandshakeSummary
impl Debug for HandshakeSummary
source§impl<'de> Deserialize<'de> for HandshakeSummary
impl<'de> Deserialize<'de> for HandshakeSummary
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 HandshakeSummary
impl RefUnwindSafe for HandshakeSummary
impl Send for HandshakeSummary
impl Sync for HandshakeSummary
impl Unpin for HandshakeSummary
impl UnwindSafe for HandshakeSummary
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
§impl<T> HashCommit for Twhere
T: Serialize,
impl<T> HashCommit for Twhere
T: Serialize,
§fn hash_commit(self) -> (Decommitment<Self>, Hash)
fn hash_commit(self) -> (Decommitment<Self>, Hash)
Creates a hash commitment to self
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more