pub struct AttestationClient { /* private fields */ }Expand description
Client for requesting attestation reports from the guest VM.
Sends HTTP POST /attest requests over the Unix socket to the guest agent, which calls the SNP_GET_REPORT ioctl and returns the hardware-signed report.
Implementations§
Source§impl AttestationClient
impl AttestationClient
Sourcepub async fn connect(socket_path: &Path) -> Result<Self>
pub async fn connect(socket_path: &Path) -> Result<Self>
Connect to the guest agent for attestation requests.
Sourcepub fn socket_path(&self) -> &Path
pub fn socket_path(&self) -> &Path
Get the socket path this client is connected to.
Sourcepub async fn get_report(
&self,
request: &AttestationRequest,
) -> Result<AttestationReport>
pub async fn get_report( &self, request: &AttestationRequest, ) -> Result<AttestationReport>
Request an attestation report from the guest VM.
The guest agent receives the request, calls SNP_GET_REPORT via
/dev/sev-guest, and returns the hardware-signed report with
the certificate chain.
§Arguments
request- Attestation request containing the verifier’s nonce
§Returns
Ok(AttestationReport)- Hardware-signed report with cert chainErr(...)- If the guest agent is unreachable or SNP is unavailable
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AttestationClient
impl RefUnwindSafe for AttestationClient
impl Send for AttestationClient
impl Sync for AttestationClient
impl Unpin for AttestationClient
impl UnsafeUnpin for AttestationClient
impl UnwindSafe for AttestationClient
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
Mutably borrows from an owned value. Read more
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>
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