This is an automated email from the ASF dual-hosted git repository.

dingyu pushed a commit to branch dcap-retrieve
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/dcap-retrieve by this push:
     new a6eece7  remove a assertion
a6eece7 is described below

commit a6eece79a4a72bab5ffca96ec55e602b790d1a08
Author: Yu Ding <[email protected]>
AuthorDate: Sun Jun 21 18:58:28 2020 -0700

    remove a assertion
---
 samplecode/dcap-pckretrieval/qpl/src/lib.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/samplecode/dcap-pckretrieval/qpl/src/lib.rs 
b/samplecode/dcap-pckretrieval/qpl/src/lib.rs
index c41bdce..784d316 100644
--- a/samplecode/dcap-pckretrieval/qpl/src/lib.rs
+++ b/samplecode/dcap-pckretrieval/qpl/src/lib.rs
@@ -107,7 +107,6 @@ pub extern "C" fn sgx_ql_get_quote_config(
     let cert_data_size: uint32_t = std::cmp::max(
         ENC_PPID_SIZE + QE3_ID_SIZE + PCEID_SIZE + CPUSVN_SIZE + PCESVN_SIZE,
         MIN_CERT_DATA_SIZE) as u32;
-    assert_eq!(cert_data_size as usize, MIN_CERT_DATA_SIZE);
 
     // cert data is:
     // ENC_PPID || PCEID || CPUSVN || PCESVN || QEID || 0x00...
@@ -122,8 +121,8 @@ pub extern "C" fn sgx_ql_get_quote_config(
     cert_data_vec.extend_from_slice(&pce_svn[..]);
     cert_data_vec.extend_from_slice(qe_id);
 
-    // we asserted QE3_ID
     cert_data_vec.resize_with(cert_data_size as usize, Default::default);
+
     let mut b = cert_data_vec.into_boxed_slice();
     let p_cert_data = b.as_mut_ptr();
     let _ = Box::into_raw(b); // memory leak here.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to