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

Function verify_cvm

verifier/src/main.rs:43–68  ·  view source on GitHub ↗
(
    verifier: &State<Arc<CvmVerifier>>,
    request: Json<VerificationRequest>,
)

Source from the content-addressed store, hash-verified

41
42#[post("/verify", data = "<request>")]
43async fn verify_cvm(
44 verifier: &State<Arc<CvmVerifier>>,
45 request: Json<VerificationRequest>,
46) -> Json<VerificationResponse> {
47 match verifier.verify(request.into_inner()).await {
48 Ok(response) => Json(response),
49 Err(e) => {
50 error!("Verification failed: {:?}", e);
51 Json(VerificationResponse {
52 is_valid: false,
53 details: VerificationDetails {
54 quote_verified: false,
55 event_log_verified: false,
56 os_image_hash_verified: false,
57 report_data: None,
58 tcb_status: None,
59 advisory_ids: vec![],
60 app_info: None,
61 acpi_tables: None,
62 rtmr_debug: None,
63 },
64 reason: Some(format!("Internal error: {}", e)),
65 })
66 }
67 }
68}
69
70#[get("/health")]
71fn health() -> Json<serde_json::Value> {

Callers

nothing calls this directly

Calls 2

into_innerMethod · 0.80
verifyMethod · 0.45

Tested by

no test coverage detected