(report: &EnclaveReport)
| 1175 | validate_td10(&report.base) |
| 1176 | } |
| 1177 | fn validate_sgx(report: &EnclaveReport) -> Result<()> { |
| 1178 | let is_debug = report.attributes[0] & 0x02 != 0; |
| 1179 | if is_debug { |
| 1180 | bail!("Debug mode is not allowed"); |
| 1181 | } |
| 1182 | Ok(()) |
| 1183 | } |
| 1184 | match &report.report { |
| 1185 | Report::TD15(report) => validate_td15(report), |
| 1186 | Report::TD10(report) => validate_td10(report), |