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

Function validate_td10

dstack-attest/src/attestation.rs:1161–1170  ·  view source on GitHub ↗
(report: &TDReport10)

Source from the content-addressed store, hash-verified

1159/// Validate the TCB attributes
1160pub fn validate_tcb(report: &TdxVerifiedReport) -> Result<()> {
1161 fn validate_td10(report: &TDReport10) -> Result<()> {
1162 let is_debug = report.td_attributes[0] & 0x01 != 0;
1163 if is_debug {
1164 bail!("Debug mode is not allowed");
1165 }
1166 if report.mr_signer_seam != [0u8; 48] {
1167 bail!("Invalid mr signer seam");
1168 }
1169 Ok(())
1170 }
1171 fn validate_td15(report: &TDReport15) -> Result<()> {
1172 if report.mr_service_td != [0u8; 48] {
1173 bail!("Invalid mr service td");

Callers 2

validate_td15Function · 0.85
validate_tcbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected