MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / validate

Method validate

tee/cocoon/RATLS.cpp:38–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 td::Result<RATLSAttestationReport> validate(const tde2e_core::PublicKey &public_key) const override {
39 // This is the special case when no expected extensions are present by client side
40 if (config_.tdx_config.allowed_image_hashes.empty() && config_.sev_config.allowed_image_hashes.empty()) {
41 // Just treat at tdx attestation report
42 return tdx::RATLSAttestationReport{};
43 }
44
45 return td::Status::Error("No extensions present and allowed image hashes aren't empty");
46 }
47
48 td::Result<RATLSAttestationReport> validate(const tde2e_core::PublicKey &public_key,
49 const tdx::RATLSExtensions &extensions) const override {

Callers

nothing calls this directly

Calls 5

hash_public_keyFunction · 0.85
is_allowedFunction · 0.85
as_sliceMethod · 0.80
image_hashFunction · 0.50
attestMethod · 0.45

Tested by

no test coverage detected