[hyper mode] Dismiss the valiadation of QE report
This commit is contained in:
parent
1d1cbb0abf
commit
f611e9c008
@ -183,6 +183,7 @@ impl InnerAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the QE report is valid
|
// Make sure the QE report is valid
|
||||||
|
#[cfg(not(feature = "hyper_mode"))]
|
||||||
SgxQeReportValidator::new(&self.target_info, nonce).validate(&qe_report)?;
|
SgxQeReportValidator::new(&self.target_info, nonce).validate(&qe_report)?;
|
||||||
|
|
||||||
// Construct the resulting quote
|
// Construct the resulting quote
|
||||||
|
@ -14,6 +14,7 @@ impl Quote {
|
|||||||
qe_report: &sgx_report_t,
|
qe_report: &sgx_report_t,
|
||||||
) -> Result<Self> {
|
) -> Result<Self> {
|
||||||
let quote_buf = Self::new_buf(quote_raw_buf)?;
|
let quote_buf = Self::new_buf(quote_raw_buf)?;
|
||||||
|
#[cfg(not(feature = "hyper_mode"))]
|
||||||
Self::validate_quote_buf("e_buf, quote_nonce, qe_report)?;
|
Self::validate_quote_buf("e_buf, quote_nonce, qe_report)?;
|
||||||
Ok(Self { quote_buf })
|
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;
|
sgx_quote_t *quote = (sgx_quote_t *)quote_buf;
|
||||||
|
#ifndef SGX_MODE_HYPER
|
||||||
if (quote->sign_type != SGX_LINKABLE_SIGNATURE) {
|
if (quote->sign_type != SGX_LINKABLE_SIGNATURE) {
|
||||||
THROW_ERROR("invalid quote: wrong sign type");
|
THROW_ERROR("invalid quote: wrong sign type");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (quote->signature_len == 0) {
|
if (quote->signature_len == 0) {
|
||||||
THROW_ERROR("invalid quote: zero-length signature");
|
THROW_ERROR("invalid quote: zero-length signature");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user