pub struct RaTlsAttestationClient { /* private fields */ }Expand description
Client for verifying TEE attestation via RA-TLS handshake.
Connects to the guest’s RA-TLS attestation server over Unix socket, performs a TLS handshake with a custom certificate verifier that extracts and verifies the SNP report from the server’s certificate.
Attestation verification happens during the TLS handshake — if the handshake succeeds, the TEE is verified.
Implementations§
Source§impl RaTlsAttestationClient
impl RaTlsAttestationClient
Sourcepub fn new(socket_path: &Path) -> Self
pub fn new(socket_path: &Path) -> Self
Create a new RA-TLS attestation client for the given socket path.
Sourcepub fn socket_path(&self) -> &Path
pub fn socket_path(&self) -> &Path
Get the socket path.
Sourcepub async fn verify(
&self,
policy: AttestationPolicy,
allow_simulated: bool,
) -> Result<VerificationResult>
pub async fn verify( &self, policy: AttestationPolicy, allow_simulated: bool, ) -> Result<VerificationResult>
Verify TEE attestation via RA-TLS handshake.
Connects to the guest attestation server, performs a TLS handshake with a custom verifier that checks the SNP report embedded in the server’s certificate, and returns the verification result.
§Arguments
policy- Attestation policy to verify againstallow_simulated- Whether to accept simulated (non-hardware) reports
Sourcepub async fn fetch_report(
&self,
allow_simulated: bool,
) -> Result<AttestationReport>
pub async fn fetch_report( &self, allow_simulated: bool, ) -> Result<AttestationReport>
Fetch the raw attestation report over RA-TLS, without applying a verification policy.
The guest attestation server speaks RA-TLS + framed messages (not plain HTTP); the signed report is carried in the server’s TLS certificate and is extracted here after the handshake.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RaTlsAttestationClient
impl RefUnwindSafe for RaTlsAttestationClient
impl Send for RaTlsAttestationClient
impl Sync for RaTlsAttestationClient
impl Unpin for RaTlsAttestationClient
impl UnsafeUnpin for RaTlsAttestationClient
impl UnwindSafe for RaTlsAttestationClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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