You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2020/02/12 19:26:21 UTC

[incubator-teaclave] branch develop updated: [dcap] Check collateral_expiration_status

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

mssun pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2330510  [dcap] Check collateral_expiration_status
2330510 is described below

commit 2330510be1417bfd55a3a7ed949fbcdd30b8c280
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Wed Feb 12 11:00:19 2020 -0800

    [dcap] Check collateral_expiration_status
---
 dcap/src/main.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dcap/src/main.rs b/dcap/src/main.rs
index 8d529d3..4293e56 100644
--- a/dcap/src/main.rs
+++ b/dcap/src/main.rs
@@ -144,7 +144,7 @@ fn verify_quote(request: String) -> QuoteVerificationResponse {
             Ok(v) => v,
             Err(_) => return QuoteVerificationResponse::BadRequest,
         };
-        let mut collateral_exp_status = 0u32;
+        let mut collateral_exp_status = 1u32;
         let mut quote_verification_result = sgx_ql_qv_result_t::SGX_QL_QV_RESULT_UNSPECIFIED;
         let mut qve_report_info = sgx_ql_qe_report_info_t::default();
 
@@ -172,6 +172,11 @@ fn verify_quote(request: String) -> QuoteVerificationResponse {
             return QuoteVerificationResponse::BadRequest;
         };
 
+        if collateral_exp_status != 0 {
+            eprintln!("collateral_exp_status fialed: {:?}", collateral_exp_status);
+            return QuoteVerificationResponse::BadRequest;
+        }
+
         let sha256 = sgx_ucrypto::SgxShaHandle::new();
         sha256.init().unwrap();
         sha256.update_msg(&nonce.rand).unwrap();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org