From f611e9c008d99bc9855e10b74a085300df9f61c8 Mon Sep 17 00:00:00 2001 From: LI Qing Date: Thu, 27 Jan 2022 17:58:35 +0800 Subject: [PATCH] [hyper mode] Dismiss the valiadation of QE report --- src/libos/src/util/sgx/epid/attestation_agent.rs | 1 + src/libos/src/util/sgx/epid/quote.rs | 1 + test/ioctl/main.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/libos/src/util/sgx/epid/attestation_agent.rs b/src/libos/src/util/sgx/epid/attestation_agent.rs index eb261b5d..a741a8c5 100644 --- a/src/libos/src/util/sgx/epid/attestation_agent.rs +++ b/src/libos/src/util/sgx/epid/attestation_agent.rs @@ -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 diff --git a/src/libos/src/util/sgx/epid/quote.rs b/src/libos/src/util/sgx/epid/quote.rs index b43632e2..e83e4e4a 100644 --- a/src/libos/src/util/sgx/epid/quote.rs +++ b/src/libos/src/util/sgx/epid/quote.rs @@ -14,6 +14,7 @@ impl Quote { qe_report: &sgx_report_t, ) -> Result { let quote_buf = Self::new_buf(quote_raw_buf)?; + #[cfg(not(feature = "hyper_mode"))] Self::validate_quote_buf("e_buf, quote_nonce, qe_report)?; Ok(Self { quote_buf }) } diff --git a/test/ioctl/main.c b/test/ioctl/main.c index 0488f0bc..6e247501 100644 --- a/test/ioctl/main.c +++ b/test/ioctl/main.c @@ -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"); }