pub struct Verifier<T: VerifierState> { /* private fields */ }
Expand description
A Verifier instance.
Implementations§
source§impl Verifier<Notarize>
impl Verifier<Notarize>
sourcepub async fn finalize(
self,
config: &AttestationConfig,
) -> Result<Attestation, VerifierError>
pub async fn finalize( self, config: &AttestationConfig, ) -> Result<Attestation, VerifierError>
source§impl Verifier<Verify>
impl Verifier<Verify>
sourcepub async fn receive(&mut self) -> Result<PartialTranscript, VerifierError>
pub async fn receive(&mut self) -> Result<PartialTranscript, VerifierError>
Receives the purported transcript from the Prover.
§Warning
The content of the received transcript can not be considered authentic until after finalization.
sourcepub async fn finalize(self) -> Result<SessionInfo, VerifierError>
pub async fn finalize(self) -> Result<SessionInfo, VerifierError>
Verifies the TLS session.
source§impl Verifier<Initialized>
impl Verifier<Initialized>
sourcepub fn new(config: VerifierConfig) -> Self
pub fn new(config: VerifierConfig) -> Self
Creates a new verifier.
sourcepub async fn setup<S: AsyncWrite + AsyncRead + Send + Unpin + 'static>(
self,
socket: S,
) -> Result<Verifier<Setup>, VerifierError>
pub async fn setup<S: AsyncWrite + AsyncRead + Send + Unpin + 'static>( self, socket: S, ) -> Result<Verifier<Setup>, VerifierError>
sourcepub async fn notarize<S: AsyncWrite + AsyncRead + Send + Unpin + 'static>(
self,
socket: S,
config: &AttestationConfig,
) -> Result<Attestation, VerifierError>
pub async fn notarize<S: AsyncWrite + AsyncRead + Send + Unpin + 'static>( self, socket: S, config: &AttestationConfig, ) -> Result<Attestation, VerifierError>
Runs the TLS verifier to completion, notarizing the TLS session.
This is a convenience method which runs all the steps needed for notarization.
§Arguments
socket
- The socket to the prover.config
- The attestation configuration.
sourcepub async fn verify<S: AsyncWrite + AsyncRead + Send + Unpin + 'static>(
self,
socket: S,
) -> Result<(PartialTranscript, SessionInfo), VerifierError>
pub async fn verify<S: AsyncWrite + AsyncRead + Send + Unpin + 'static>( self, socket: S, ) -> Result<(PartialTranscript, SessionInfo), VerifierError>
Runs the TLS verifier to completion, verifying the TLS session.
This is a convenience method which runs all the steps needed for verification.
§Arguments
socket
- The socket to the prover.
source§impl Verifier<Closed>
impl Verifier<Closed>
sourcepub fn start_notarize(self) -> Verifier<Notarize>
pub fn start_notarize(self) -> Verifier<Notarize>
Starts notarization of the TLS session.
If the verifier is a Notary, this function will transition the verifier to the next state where it can sign the prover’s commitments to the transcript.
sourcepub fn start_verify(self) -> Verifier<Verify>
pub fn start_verify(self) -> Verifier<Verify>
Starts verification of the TLS session.
This function transitions the verifier into a state where it can verify the contents of the transcript.
Auto Trait Implementations§
impl<T> Freeze for Verifier<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Verifier<T>
impl<T> Send for Verifier<T>where
T: Send,
impl<T> Sync for Verifier<T>where
T: Sync,
impl<T> Unpin for Verifier<T>where
T: Unpin,
impl<T> !UnwindSafe for Verifier<T>
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
§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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SpawnCompatExt for T
impl<T> SpawnCompatExt for T
§fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Compat
wrapper.§fn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Compat
wrapper.§impl<T> SpawnCompatExt for T
impl<T> SpawnCompatExt for T
§fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Compat
wrapper.§fn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Compat
wrapper.