代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/secGear 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 248f56df792c14421074a6049ac668464070a574 Mon Sep 17 00:00:00 2001
From: zhengxiaoxiao <zhengxiaoxiao2@huawei.com>
Date: Tue, 12 Mar 2024 16:53:22 +0800
Subject: [PATCH] use memset instead of explicit_bzero
Reference: https://gitee.com/openeuler/secGear/commit/248f56df792c14421074a6049ac668464070a574
Conflict: NA
---
src/enclave_src/gp/itrustee/itrustee_seal_data.c | 8 ++++----
src/host_src/enclave.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/enclave_src/gp/itrustee/itrustee_seal_data.c b/src/enclave_src/gp/itrustee/itrustee_seal_data.c
index cae1734..b074d6f 100644
--- a/src/enclave_src/gp/itrustee/itrustee_seal_data.c
+++ b/src/enclave_src/gp/itrustee/itrustee_seal_data.c
@@ -139,13 +139,13 @@ TEE_Result itrustee_seal_data(uint8_t *seal_data, uint32_t seal_data_len, void *
result = data_copy(tmp_sealed_data, salt, nonce, mac_data, mac_data_len);
error0:
- explicit_bzero(nonce, SEAL_DATA_NONCE_LEN);
+ memset(nonce, 0, SEAL_DATA_NONCE_LEN);
TEE_Free(nonce);
error1:
- explicit_bzero(salt, SEAL_KEY_SALT_LEN);
+ memset(salt, 0, SEAL_KEY_SALT_LEN);
TEE_Free(salt);
error2:
- explicit_bzero(key_buf, SEAL_KEY_LEN);
+ memset(key_buf, 0, SEAL_KEY_LEN);
TEE_Free(key_buf);
return result;
}
@@ -251,7 +251,7 @@ TEE_Result itrustee_unseal_data(void *sealed_data, uint8_t *decrypted_data, uint
}
done:
- explicit_bzero(key_buf, SEAL_KEY_LEN);
+ memset(key_buf, 0, SEAL_KEY_LEN);
TEE_Free(key_buf);
return result;
}
diff --git a/src/host_src/enclave.c b/src/host_src/enclave.c
index d8b7d35..f13feec 100644
--- a/src/host_src/enclave.c
+++ b/src/host_src/enclave.c
@@ -70,7 +70,7 @@ static void error_handle(cc_enclave_t *enclave, void *handle, p_tee_registered r
if (enclave) {
pthread_rwlock_destroy(&enclave->rwlock);
- explicit_bzero(enclave, sizeof(cc_enclave_t));
+ memset(enclave, 0, sizeof(cc_enclave_t));
}
}
@@ -310,7 +310,7 @@ cc_enclave_result_t cc_enclave_destroy(cc_enclave_t *context)
}
pthread_rwlock_unlock(&context->rwlock);
pthread_rwlock_destroy(&context->rwlock);
- explicit_bzero(context, sizeof(cc_enclave_t));
+ memset(context, 0, sizeof(cc_enclave_t));
return CC_SUCCESS;
}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。