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

Method verify_os_image_hash

verifier/src/verification.rs:490–513  ·  view source on GitHub ↗
(
        &self,
        vm_config: String,
        attestation: &VerifiedAttestation,
        debug: bool,
        details: &mut VerificationDetails,
    )

Source from the content-addressed store, hash-verified

488 }
489
490 pub async fn verify_os_image_hash(
491 &self,
492 vm_config: String,
493 attestation: &VerifiedAttestation,
494 debug: bool,
495 details: &mut VerificationDetails,
496 ) -> Result<VmConfig> {
497 let vm_config = attestation
498 .decode_vm_config(&vm_config)
499 .context("Failed to decode VM config")?;
500 match &attestation.quote {
501 AttestationQuote::DstackTdx(_) => {
502 self.verify_os_image_hash_for_dstack_tdx(&vm_config, attestation, debug, details)
503 .await?;
504 }
505 AttestationQuote::DstackGcpTdx | AttestationQuote::DstackNitroEnclave => {
506 bail!(
507 "Unsupported attestation quote: {:?}",
508 attestation.quote.mode()
509 );
510 }
511 }
512 Ok(vm_config)
513 }
514
515 async fn verify_os_image_hash_for_dstack_tdx(
516 &self,

Callers 1

verifyMethod · 0.45

Calls 2

decode_vm_configMethod · 0.80

Tested by

no test coverage detected