[hyper mode] Dismiss the valiadation of QE report

This commit is contained in:
LI Qing 2022-01-27 17:58:35 +08:00 committed by Zongmin.Gu
parent 1d1cbb0abf
commit f611e9c008
3 changed files with 4 additions and 0 deletions

@ -183,6 +183,7 @@ impl InnerAgent {
}
// Make sure the QE report is valid
#[cfg(not(feature = "hyper_mode"))]
SgxQeReportValidator::new(&self.target_info, nonce).validate(&qe_report)?;
// Construct the resulting quote

@ -14,6 +14,7 @@ impl Quote {
qe_report: &sgx_report_t,
) -> Result<Self> {
let quote_buf = Self::new_buf(quote_raw_buf)?;
#[cfg(not(feature = "hyper_mode"))]
Self::validate_quote_buf(&quote_buf, quote_nonce, qe_report)?;
Ok(Self { quote_buf })
}

@ -240,9 +240,11 @@ static int do_SGXIOC_GEN_QUOTE(int sgx_fd) {
}
sgx_quote_t *quote = (sgx_quote_t *)quote_buf;
#ifndef SGX_MODE_HYPER
if (quote->sign_type != SGX_LINKABLE_SIGNATURE) {
THROW_ERROR("invalid quote: wrong sign type");
}
#endif
if (quote->signature_len == 0) {
THROW_ERROR("invalid quote: zero-length signature");
}