mirror of
https://gitee.com/openharmony/security_huks
synced 2024-11-27 08:51:08 +00:00
!1228 HKS_ENABLE_CLEAN_FILE相关依赖
Merge pull request !1228 from lwt999/master
This commit is contained in:
commit
5253fdf501
@ -12,6 +12,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//base/security/huks/huks.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
if (os_level == "standard") {
|
||||
@ -50,6 +51,7 @@ if (os_level == "standard") {
|
||||
deps = []
|
||||
defines = []
|
||||
include_dirs = []
|
||||
external_deps = []
|
||||
if (huks_use_rkc_in_standard) {
|
||||
defines += [ "HKS_USE_RKC_IN_STANDARD" ]
|
||||
|
||||
@ -65,6 +67,17 @@ if (os_level == "standard") {
|
||||
"//base/security/huks/services/huks_standard/huks_service/main/os_dependency/posix/hks_rwlock.c",
|
||||
]
|
||||
|
||||
# when uks_use_rkc_in_standard and HKS_ENABLE_CLEAN_FILE are enabled at the same time, add the dependency of HDI to the engine
|
||||
if (huks_enable_hdi_in_standard) {
|
||||
sources += [ "//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/passthrough/huks_hdi_access.c" ]
|
||||
external_deps += [ "drivers_interface_huks:libhuks_proxy_1.0" ]
|
||||
} else {
|
||||
sources += [
|
||||
"//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/passthrough/huks_access.c",
|
||||
"//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/passthrough/huks_core_dynamic_hal.c",
|
||||
]
|
||||
}
|
||||
|
||||
deps += [
|
||||
"//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_os_dependency_standard_static",
|
||||
"//base/security/huks/utils/file_operator:libhuks_utils_file_operator_static",
|
||||
@ -91,7 +104,7 @@ if (os_level == "standard") {
|
||||
boundary_sanitize = true
|
||||
ubsan = true
|
||||
}
|
||||
external_deps = [
|
||||
external_deps += [
|
||||
"c_utils:utils",
|
||||
"hilog:libhilog",
|
||||
]
|
||||
|
@ -133,7 +133,7 @@ static const struct HksParam g_verifyParams[] = {
|
||||
static const struct HksParam g_agreeParams[] = {
|
||||
{ .tag = HKS_TAG_ALGORITHM, .uint32Param = HKS_ALG_DH },
|
||||
{ .tag = HKS_TAG_PURPOSE, .uint32Param = HKS_KEY_PURPOSE_AGREE },
|
||||
{ .tag = HKS_TAG_KEY_SIZE, .uint32Param = HKS_DH_KEY_SIZE_4096 },
|
||||
{ .tag = HKS_TAG_KEY_SIZE, .uint32Param = HKS_DH_KEY_SIZE_2048 },
|
||||
{ .tag = HKS_TAG_AUTH_STORAGE_LEVEL, .uint32Param = HKS_AUTH_STORAGE_LEVEL_DE },
|
||||
};
|
||||
|
||||
@ -419,7 +419,7 @@ HWTEST_F(HksBackupTest, HksBackupPartTest005, TestSize.Level0)
|
||||
ret = HksGenerateKey(&keyAlias, paramSet0, nullptr);
|
||||
ASSERT_EQ(ret, HKS_SUCCESS);
|
||||
|
||||
uint8_t pubKeyText[HKS_DH_KEY_SIZE_4096] = { 0 };
|
||||
uint8_t pubKeyText[HKS_DH_KEY_SIZE_2048] = { 0 };
|
||||
struct HksBlob pubKey = { .size = HKS_ARRAY_SIZE(pubKeyText), .data = pubKeyText };
|
||||
ret = HksExportPublicKey(&keyAlias, paramSet0, &pubKey);
|
||||
ASSERT_EQ(ret, HKS_SUCCESS);
|
||||
@ -452,7 +452,7 @@ HWTEST_F(HksBackupTest, HksBackupPartTest006, TestSize.Level0)
|
||||
ret = HksGenerateKey(&keyAlias, paramSet0, nullptr);
|
||||
ASSERT_EQ(ret, HKS_SUCCESS);
|
||||
|
||||
uint8_t pubKeyText[HKS_DH_KEY_SIZE_4096] = { 0 };
|
||||
uint8_t pubKeyText[HKS_DH_KEY_SIZE_2048] = { 0 };
|
||||
struct HksBlob pubKey = { .size = HKS_ARRAY_SIZE(pubKeyText), .data = pubKeyText };
|
||||
ret = HksExportPublicKey(&keyAlias, paramSet0, &pubKey);
|
||||
ASSERT_EQ(ret, HKS_SUCCESS);
|
||||
|
Loading…
Reference in New Issue
Block a user