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/10 05:36:38 UTC

[incubator-teaclave] branch develop updated (a83d5aa -> 9df6e31)

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

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


 discard a83d5aa  [dcap] Fxi verstions of dependencies
     new 9df6e31  [dcap] Fix versions of dependencies

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a83d5aa)
            \
             N -- N -- N   refs/heads/develop (9df6e31)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


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


[incubator-teaclave] 01/01: [dcap] Fix versions of dependencies

Posted by ms...@apache.org.
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

commit 9df6e315012f90d1ea6c5984e9ff885723031229
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Sun Feb 9 21:33:09 2020 -0800

    [dcap] Fix versions of dependencies
---
 dcap/Cargo.toml  | 15 ++++++---------
 dcap/src/main.rs | 31 +++++++++++++++----------------
 2 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/dcap/Cargo.toml b/dcap/Cargo.toml
index 1556ad5..086aece 100644
--- a/dcap/Cargo.toml
+++ b/dcap/Cargo.toml
@@ -6,22 +6,19 @@ description = "Teaclave DCAP Attestation Service (Reference Implementation)"
 license = "Apache-2.0"
 edition = "2018"
 
-[features]
-default = []
-
 [dependencies]
 base64           = { version = "0.10.1" }
 hex              = { version = "0.4.0" }
 serde            = { version = "1.0.92", features = ["derive"] }
 serde_json       = { version = "1.0.39" }
 rocket           = { git = "https://github.com/SergioBenitez/Rocket", features = ["tls"] }
-libc             = { version = "*" }
+libc             = { version = "0.2.66" }
 rand             = { version = "0.7.3" }
-ring             = { version = "*" }
-untrusted        = { version = "*" }
-uuid             = { version = "*", features = ["v4"] }
-chrono           = { version = "*" }
-lazy_static      = { version = "*" }
+ring             = { version = "0.16.11" }
+untrusted        = { version = "0.7.0" }
+uuid             = { version = "0.8.1", features = ["v4"] }
+chrono           = { version = "0.4.10" }
+lazy_static      = { version = "1.4.0" }
 percent-encoding = { version = "2.1.0" }
 
 sgx_types        = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk" }
diff --git a/dcap/src/main.rs b/dcap/src/main.rs
index cd855fe..871b31c 100644
--- a/dcap/src/main.rs
+++ b/dcap/src/main.rs
@@ -150,23 +150,22 @@ fn verify_quote(request: String) -> QuoteVerificationResponse {
         rng.fill_bytes(&mut nonce.rand);
         qve_report_info.nonce = nonce;
         let mut expiration_check_date: time_t = 0;
+        let ret = unsafe {
+            sgx_qv_verify_quote(
+                quote.as_ptr(),
+                quote.len() as _,
+                std::ptr::null() as _,
+                libc::time(&mut expiration_check_date),
+                &mut collateral_exp_status as _,
+                &mut quote_verification_result as _,
+                &mut qve_report_info as _,
+                0,
+                std::ptr::null_mut(),
+            )
+        };
 
-        if sgx_quote3_error_t::SGX_QL_SUCCESS
-            != unsafe {
-                sgx_qv_verify_quote(
-                    quote.as_ptr(),
-                    quote.len() as _,
-                    std::ptr::null() as _,
-                    libc::time(&mut expiration_check_date),
-                    &mut collateral_exp_status as _,
-                    &mut quote_verification_result as _,
-                    &mut qve_report_info as _,
-                    0,
-                    std::ptr::null_mut(),
-                )
-            }
-        {
-            eprintln!("sgx_qv_verify_quote fialed");
+        if ret != sgx_quote3_error_t::SGX_QL_SUCCESS {
+            eprintln!("sgx_qv_verify_quote fialed: {:?}", ret);
             return QuoteVerificationResponse::BadRequest;
         };
 


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