代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/secGear 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From c11313e25c077743ec9fb88d4463a18370dcb881 Mon Sep 17 00:00:00 2001
From: zgzxx <zhangguangzhi3@huawei.com>
Date: Thu, 11 Mar 2021 10:46:05 +0800
Subject: [PATCH 4/6] parse new error code and del redundant print
---
inc/host_inc/status.h | 2 +-
src/host_src/enclave_internal.c | 2 +-
src/host_src/sgx/sgx_enclave.c | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/inc/host_inc/status.h b/inc/host_inc/status.h
index 84c092a..1d18d2e 100644
--- a/inc/host_inc/status.h
+++ b/inc/host_inc/status.h
@@ -56,7 +56,7 @@ typedef enum _enclave_result_t
CC_ERROR_INVALID_ISVSVN, /* The isv svn is greater than the enclave's isv svn */
CC_ERROR_INVALID_KEYNAME, /* The key name is an unsupported value */
CC_ERROR_AE_INVALID_EPIDBLOB, /* Indicates epid blob verification error */
- CC_ERROR_SERVICE_INVALID_PRIVILEGE, /* Enclave has no privilege to get launch token */
+ CC_ERROR_SERVICE_INVALID_PRIVILEGE, /* Enclave not authorized to run */
CC_ERROR_EPID_MEMBER_REVOKED, /* The EPID group membership is revoked */
CC_ERROR_UPDATE_NEEDED, /* SDK need to be update*/
CC_ERROR_MC_NOT_FOUND, /* The Monotonic Counter doesn't exist or has been invalided */
diff --git a/src/host_src/enclave_internal.c b/src/host_src/enclave_internal.c
index 9a172bd..962fc07 100644
--- a/src/host_src/enclave_internal.c
+++ b/src/host_src/enclave_internal.c
@@ -64,7 +64,7 @@ static err2str g_secgearerror [] =
{CC_ERROR_INVALID_ISVSVN, "The isv svn is greater than the enclave's isv svn."},
{CC_ERROR_INVALID_KEYNAME, "The key name is an unsupported value."},
{CC_ERROR_AE_INVALID_EPIDBLOB, "Indicates epid blob verification error."},
- {CC_ERROR_SERVICE_INVALID_PRIVILEGE, "Enclave has no privilege to get launch token."},
+ {CC_ERROR_SERVICE_INVALID_PRIVILEGE, "Enclave not authorized to run."},
{CC_ERROR_EPID_MEMBER_REVOKED, "The EPID group membership is revoked."},
{CC_ERROR_UPDATE_NEEDED, "SDK need to be update."},
{CC_ERROR_MC_NOT_FOUND, "The Monotonic Counter doesn't exist or has been invalided."},
diff --git a/src/host_src/sgx/sgx_enclave.c b/src/host_src/sgx/sgx_enclave.c
index b37c748..a40c408 100644
--- a/src/host_src/sgx/sgx_enclave.c
+++ b/src/host_src/sgx/sgx_enclave.c
@@ -59,6 +59,8 @@ cc_enclave_result_t conversion_res_status(uint32_t enclave_res, enclave_type_ver
return CC_ERROR_OUT_OF_TCS;
case SGX_ERROR_ENCLAVE_CRASHED:
return CC_ERROR_ENCLAVE_DEAD;
+ case SGX_ERROR_SERVICE_INVALID_PRIVILEGE:
+ return CC_ERROR_SERVICE_INVALID_PRIVILEGE;
default:
return CC_ERROR_UNEXPECTED;
}
@@ -131,7 +133,7 @@ cc_enclave_result_t _sgx_create(cc_enclave_t **enclave, const enclave_features_t
NULL, &(l_context->edi), NULL);
if (sgx_res != SGX_SUCCESS) {
res = conversion_res_status(sgx_res, (*enclave)->type);
- print_error_goto("Failed to create sgx enclave %s\n",cc_enclave_res2_str(res));
+ print_error_goto("Failed to create sgx enclave\n");
}
break;
case 1:
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。