MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / verify_with_ra_pubkey

Method verify_with_ra_pubkey

dstack-attest/src/attestation.rs:622–632  ·  view source on GitHub ↗

Verify the quote against a RA-TLS public key.

(
        self,
        ra_pubkey_der: &[u8],
        pccs_url: Option<&str>,
    )

Source from the content-addressed store, hash-verified

620
621 /// Verify the quote against a RA-TLS public key.
622 pub async fn verify_with_ra_pubkey(
623 self,
624 ra_pubkey_der: &[u8],
625 pccs_url: Option<&str>,
626 ) -> Result<VerifiedAttestation> {
627 let expected_report_data = QuoteContentType::RaTlsCert.to_report_data(ra_pubkey_der);
628 if self.report_data()? != expected_report_data {
629 bail!("report data mismatch");
630 }
631 self.verify(pccs_url).await
632 }
633
634 /// Verify the quote.
635 pub async fn verify(self, pccs_url: Option<&str>) -> Result<VerifiedAttestation> {

Callers 3

sign_certMethod · 0.80
handle_prpc_implFunction · 0.80

Calls 3

to_report_dataMethod · 0.80
report_dataMethod · 0.80
verifyMethod · 0.45

Tested by

no test coverage detected