Projects
Eulaceura:Factory
hiviewdfx_hisysevent
_service:obs_scm:0008-remove-dependency-and-ada...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0008-remove-dependency-and-adapt-for-build-huks.patch of Package hiviewdfx_hisysevent
From 9fe22ea5837611fadad5c9270417e62b1debf070 Mon Sep 17 00:00:00 2001 From: heppen <hepeng68@huawei.com> Date: Tue, 20 Jun 2023 17:34:18 +0800 Subject: [PATCH] remove dependency and adapt for build --- frameworks/crypto_lite/js/napi/BUILD.gn | 2 +- frameworks/huks_standard/main/common/BUILD.gn | 12 ++-- .../main/common/include/hks_config.h | 10 +-- frameworks/huks_standard/main/core/BUILD.gn | 12 ++-- .../huks_standard/main/crypto_engine/BUILD.gn | 12 ++-- .../main/crypto_engine/mbedtls/BUILD.gn | 12 ++-- .../main/crypto_engine/openssl/BUILD.gn | 12 ++-- .../huks_standard/main/os_dependency/BUILD.gn | 12 ++-- .../innerkits/huks_standard/main/BUILD.gn | 12 ++-- interfaces/kits/c/BUILD.gn | 2 +- interfaces/kits/napi/BUILD.gn | 12 ++-- services/huks_standard/BUILD.gn | 12 ++-- .../huks_engine/main/core/BUILD.gn | 12 ++-- .../huks_engine/main/core_dependency/BUILD.gn | 13 ++-- .../huks_standard/huks_service/main/BUILD.gn | 12 ++-- .../huks_service/main/core/BUILD.gn | 16 ++--- .../huks_service/main/os_dependency/BUILD.gn | 16 ++--- .../main/os_dependency/idl/BUILD.gn | 14 ++-- .../huks_service/main/systemapi_mock/BUILD.gn | 10 +-- .../hisysevent_wrapper/BUILD.gn | 12 ++-- .../src/hisysevent_wrapper.cpp | 65 ++++++++++--------- .../hitrace_meter_wrapper/BUILD.gn | 12 ++-- .../src/hitrace_meter_wrapper.cpp | 10 +-- .../main/systemapi_wrap/useridm/BUILD.gn | 14 ++-- test/reliability/BUILD.gn | 2 +- .../huks_standard_test/module_test/BUILD.gn | 4 +- .../inner_kits_passthrough/BUILD.gn | 8 +-- .../module_test/mock/BUILD.gn | 2 +- .../os_dependency/idl/ipc/BUILD.gn | 2 +- .../systemapi_wrap/useridm_test/BUILD.gn | 2 +- .../storage_multithread_test/BUILD.gn | 2 +- .../three_stage_test/BUILD.gn | 2 +- utils/condition/BUILD.gn | 12 ++-- utils/crypto_adapter/BUILD.gn | 12 ++-- utils/file_operator/BUILD.gn | 12 ++-- utils/list/BUILD.gn | 10 +-- utils/mutex/BUILD.gn | 12 ++-- 37 files changed, 207 insertions(+), 203 deletions(-) diff --git a/frameworks/crypto_lite/js/napi/BUILD.gn b/frameworks/crypto_lite/js/napi/BUILD.gn index 5cc2e51c..fe01944b 100644 --- a/frameworks/crypto_lite/js/napi/BUILD.gn +++ b/frameworks/crypto_lite/js/napi/BUILD.gn @@ -17,7 +17,7 @@ import("//build/ohos.gni") ohos_shared_library("cipher_napi") { defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/frameworks/huks_standard/main/common/BUILD.gn b/frameworks/huks_standard/main/common/BUILD.gn index 536d4cce..bfb42775 100644 --- a/frameworks/huks_standard/main/common/BUILD.gn +++ b/frameworks/huks_standard/main/common/BUILD.gn @@ -21,15 +21,15 @@ config("huks_config") { } ohos_static_library("libhuks_common_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/frameworks/huks_standard/main/common/include/hks_config.h b/frameworks/huks_standard/main/common/include/hks_config.h index b8137e63..188b48fb 100644 --- a/frameworks/huks_standard/main/common/include/hks_config.h +++ b/frameworks/huks_standard/main/common/include/hks_config.h @@ -25,7 +25,7 @@ #define HKS_SUPPORT_API_ATTEST_KEY -#define HKS_SUPPORT_ACCESS_TOKEN +// #define HKS_SUPPORT_ACCESS_TOKEN /* AES */ #define HKS_SUPPORT_AES_C @@ -220,9 +220,9 @@ #endif /* Key user auth access control */ -#if defined(HKS_SUPPORT_HMAC_C) && defined(HKS_SUPPORT_API_GENERATE_KEY) && (defined(HKS_SUPPORT_API_IMPORT) || \ - defined(HKS_SUPPORT_API_GENERATE_KEY) || defined(HKS_SUPPORT_API_IMPORT_WRAPPED_KEY)) -#define HKS_SUPPORT_USER_AUTH_ACCESS_CONTROL -#endif +// #if defined(HKS_SUPPORT_HMAC_C) && defined(HKS_SUPPORT_API_GENERATE_KEY) && (defined(HKS_SUPPORT_API_IMPORT) || \ +// defined(HKS_SUPPORT_API_GENERATE_KEY) || defined(HKS_SUPPORT_API_IMPORT_WRAPPED_KEY)) +// #define HKS_SUPPORT_USER_AUTH_ACCESS_CONTROL +// #endif #endif /* HKS_CONFIG_H */ diff --git a/frameworks/huks_standard/main/core/BUILD.gn b/frameworks/huks_standard/main/core/BUILD.gn index 5108a6ac..675829aa 100644 --- a/frameworks/huks_standard/main/core/BUILD.gn +++ b/frameworks/huks_standard/main/core/BUILD.gn @@ -18,11 +18,11 @@ config("huks_config") { } ohos_static_library("libhuks_core_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -32,7 +32,7 @@ ohos_static_library("libhuks_core_standard_static") { "//third_party/openssl/include/", ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/frameworks/huks_standard/main/crypto_engine/BUILD.gn b/frameworks/huks_standard/main/crypto_engine/BUILD.gn index 598b3fdc..a19a8fa2 100644 --- a/frameworks/huks_standard/main/crypto_engine/BUILD.gn +++ b/frameworks/huks_standard/main/crypto_engine/BUILD.gn @@ -15,13 +15,13 @@ import("//base/security/huks/huks.gni") import("//build/ohos.gni") ohos_static_library("libhuks_crypto_engine_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/frameworks/huks_standard/main/crypto_engine/mbedtls/BUILD.gn b/frameworks/huks_standard/main/crypto_engine/mbedtls/BUILD.gn index ddd52675..47b07c86 100644 --- a/frameworks/huks_standard/main/crypto_engine/mbedtls/BUILD.gn +++ b/frameworks/huks_standard/main/crypto_engine/mbedtls/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_mbedtls_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -31,7 +31,7 @@ ohos_static_library("libhuks_mbedtls_standard_static") { include_dirs = [ "//commonlibrary/c_utils/base/include" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/frameworks/huks_standard/main/crypto_engine/openssl/BUILD.gn b/frameworks/huks_standard/main/crypto_engine/openssl/BUILD.gn index 82e2d183..e5e7facd 100644 --- a/frameworks/huks_standard/main/crypto_engine/openssl/BUILD.gn +++ b/frameworks/huks_standard/main/crypto_engine/openssl/BUILD.gn @@ -19,17 +19,17 @@ config("huks_config") { } ohos_static_library("libhuks_openssl_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/frameworks/huks_standard/main/os_dependency/BUILD.gn b/frameworks/huks_standard/main/os_dependency/BUILD.gn index fa5d8be6..d0e4bdec 100644 --- a/frameworks/huks_standard/main/os_dependency/BUILD.gn +++ b/frameworks/huks_standard/main/os_dependency/BUILD.gn @@ -21,18 +21,18 @@ config("huks_config") { } ohos_static_library("libhuks_os_dependency_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] include_dirs = [ "log" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/interfaces/innerkits/huks_standard/main/BUILD.gn b/interfaces/innerkits/huks_standard/main/BUILD.gn index 29c855d4..42da7625 100644 --- a/interfaces/innerkits/huks_standard/main/BUILD.gn +++ b/interfaces/innerkits/huks_standard/main/BUILD.gn @@ -19,17 +19,17 @@ config("huks_config") { if (os_level == "standard") { ohos_shared_library("libhukssdk") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/interfaces/kits/c/BUILD.gn b/interfaces/kits/c/BUILD.gn index 0b5f6763..18f546c6 100755 --- a/interfaces/kits/c/BUILD.gn +++ b/interfaces/kits/c/BUILD.gn @@ -38,7 +38,7 @@ config("huks_config") { ohos_shared_library("huks_ndk") { public_configs = [ ":huks_config" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/interfaces/kits/napi/BUILD.gn b/interfaces/kits/napi/BUILD.gn index 64812f7b..bcd972a8 100644 --- a/interfaces/kits/napi/BUILD.gn +++ b/interfaces/kits/napi/BUILD.gn @@ -14,14 +14,14 @@ import("//build/ohos.gni") ohos_shared_library("huks") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } defines = [ "HUKS_NAPI_ERRORCODE_WITH_MESSAGE", - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/services/huks_standard/BUILD.gn b/services/huks_standard/BUILD.gn index 9d15449c..b5d9192c 100644 --- a/services/huks_standard/BUILD.gn +++ b/services/huks_standard/BUILD.gn @@ -21,15 +21,15 @@ ohos_prebuilt_etc("huks_service.rc") { } ohos_shared_library("huks_service") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/services/huks_standard/huks_engine/main/core/BUILD.gn b/services/huks_standard/huks_engine/main/core/BUILD.gn index b234c6c4..c0c8e08f 100644 --- a/services/huks_standard/huks_engine/main/core/BUILD.gn +++ b/services/huks_standard/huks_engine/main/core/BUILD.gn @@ -19,17 +19,17 @@ config("huks_config") { } ohos_shared_library("huks_engine_core_standard") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/services/huks_standard/huks_engine/main/core_dependency/BUILD.gn b/services/huks_standard/huks_engine/main/core_dependency/BUILD.gn index d9c50406..6a765fd4 100644 --- a/services/huks_standard/huks_engine/main/core_dependency/BUILD.gn +++ b/services/huks_standard/huks_engine/main/core_dependency/BUILD.gn @@ -18,17 +18,17 @@ config("huks_config") { } ohos_static_library("libhuks_core_hal_api_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] @@ -39,6 +39,7 @@ ohos_static_library("libhuks_core_hal_api_static") { "-Werror", ] cflags = cflags_cc + cflags_c = [ "-Wno-sign-compare" ] complete_static_lib = true external_deps = [ "hiviewdfx_hilog_native:libhilog" ] } diff --git a/services/huks_standard/huks_service/main/BUILD.gn b/services/huks_standard/huks_service/main/BUILD.gn index 710a937e..2ef29256 100644 --- a/services/huks_standard/huks_service/main/BUILD.gn +++ b/services/huks_standard/huks_service/main/BUILD.gn @@ -14,15 +14,15 @@ import("//build/ohos.gni") ohos_static_library("libhuks_service_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/services/huks_standard/huks_service/main/core/BUILD.gn b/services/huks_standard/huks_service/main/core/BUILD.gn index 12ea145f..709dfb9b 100644 --- a/services/huks_standard/huks_service/main/core/BUILD.gn +++ b/services/huks_standard/huks_service/main/core/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_service_core_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -32,11 +32,11 @@ ohos_static_library("libhuks_service_core_standard_static") { "//base/security/huks/utils/file_operator", "//base/security/huks/utils/list", "//base/security/huks/utils/mutex", - "//base/security/huks/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper", + # "//base/security/huks/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper", "//commonlibrary/c_utils/base/include", ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] @@ -74,7 +74,7 @@ ohos_static_library("libhuks_service_core_standard_static") { } external_deps = [ "c_utils:utils", - "hitrace_native:libhitracechain", + # "hitrace_native:libhitracechain", "hiviewdfx_hilog_native:libhilog", ] complete_static_lib = true diff --git a/services/huks_standard/huks_service/main/os_dependency/BUILD.gn b/services/huks_standard/huks_service/main/os_dependency/BUILD.gn index d6743dce..be850e83 100644 --- a/services/huks_standard/huks_service/main/os_dependency/BUILD.gn +++ b/services/huks_standard/huks_service/main/os_dependency/BUILD.gn @@ -21,17 +21,17 @@ config("huks_config") { } ohos_static_library("libhuks_service_os_dependency_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] @@ -56,8 +56,8 @@ ohos_static_library("libhuks_service_os_dependency_standard_static") { sources += [ "sa/hks_event_observer.cpp" ] defines += [ "SUPPORT_COMMON_EVENT" ] external_deps += [ - "ability_base:want", - "common_event_service:cesfwk_innerkits", + # "ability_base:want", + # "common_event_service:cesfwk_innerkits", ] if (has_os_account_part) { defines += [ "HAS_OS_ACCOUNT_PART" ] diff --git a/services/huks_standard/huks_service/main/os_dependency/idl/BUILD.gn b/services/huks_standard/huks_service/main/os_dependency/idl/BUILD.gn index c8c27476..c1f2e207 100644 --- a/services/huks_standard/huks_service/main/os_dependency/idl/BUILD.gn +++ b/services/huks_standard/huks_service/main/os_dependency/idl/BUILD.gn @@ -18,18 +18,18 @@ config("huks_config") { } ohos_static_library("libhuks_service_idl_standard_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] include_dirs = [ "//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/passthrough" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] @@ -47,7 +47,7 @@ ohos_static_library("libhuks_service_idl_standard_static") { external_deps = [ "ipc:ipc_core" ] external_deps += [ - "access_token:libaccesstoken_sdk", + # "access_token:libaccesstoken_sdk", "hiviewdfx_hilog_native:libhilog", ] diff --git a/services/huks_standard/huks_service/main/systemapi_mock/BUILD.gn b/services/huks_standard/huks_service/main/systemapi_mock/BUILD.gn index 68efecae..66f480f4 100644 --- a/services/huks_standard/huks_service/main/systemapi_mock/BUILD.gn +++ b/services/huks_standard/huks_service/main/systemapi_mock/BUILD.gn @@ -18,11 +18,11 @@ config("libhuks_service_systemapi_mock_config") { } ohos_static_library("libhuks_service_systemapi_mock_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] diff --git a/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/BUILD.gn b/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/BUILD.gn index 84809fef..faf53319 100644 --- a/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/BUILD.gn +++ b/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_utils_hisysevent_wrapper_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -41,7 +41,7 @@ ohos_static_library("libhuks_utils_hisysevent_wrapper_static") { "-Werror", ] external_deps = [ - "hisysevent_native:libhisysevent", + # "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", ] complete_static_lib = true diff --git a/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/src/hisysevent_wrapper.cpp b/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/src/hisysevent_wrapper.cpp index 2b16337e..81e4738e 100644 --- a/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/src/hisysevent_wrapper.cpp +++ b/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/src/hisysevent_wrapper.cpp @@ -15,56 +15,57 @@ #include "hisysevent_wrapper.h" -#include "hisysevent.h" +// #include "hisysevent.h" #include "hks_log.h" #include "hks_template.h" -using namespace OHOS::HiviewDFX; +// using namespace OHOS::HiviewDFX; -static constexpr const char g_eventName[] = "HUKS_FAULT"; -static constexpr const char g_tagFunction[] = "FUNCTION"; -static constexpr const char g_tagUserId[] = "USER_ID"; -static constexpr const char g_tagProcessUID[] = "PROCESS_UID"; -static constexpr const char g_tagKeyType[] = "KEY_TYPE"; -static constexpr const char g_tagErrorCode[] = "ERROR_CODE"; -static constexpr const char g_tagExtra[] = "EXTRA"; +// static constexpr const char g_eventName[] = "HUKS_FAULT"; +// static constexpr const char g_tagFunction[] = "FUNCTION"; +// static constexpr const char g_tagUserId[] = "USER_ID"; +// static constexpr const char g_tagProcessUID[] = "PROCESS_UID"; +// static constexpr const char g_tagKeyType[] = "KEY_TYPE"; +// static constexpr const char g_tagErrorCode[] = "ERROR_CODE"; +// static constexpr const char g_tagExtra[] = "EXTRA"; static int32_t ConvertToHiSysEventType(enum EventType inEventType, int32_t *outEventTypeInt) { - switch (inEventType) { - case FAULT: - *outEventTypeInt = HiSysEvent::EventType::FAULT; - break; - case STATISTIC: - *outEventTypeInt = HiSysEvent::EventType::STATISTIC; - break; - case SECURITY: - *outEventTypeInt = HiSysEvent::EventType::SECURITY; - break; - case BEHAVIOR: - *outEventTypeInt = HiSysEvent::EventType::BEHAVIOR; - break; - default: - HKS_LOG_E("Invalid inEventType!"); - return HKS_ERROR_INVALID_ARGUMENT; - } + // switch (inEventType) { + // case FAULT: + // *outEventTypeInt = HiSysEvent::EventType::FAULT; + // break; + // case STATISTIC: + // *outEventTypeInt = HiSysEvent::EventType::STATISTIC; + // break; + // case SECURITY: + // *outEventTypeInt = HiSysEvent::EventType::SECURITY; + // break; + // case BEHAVIOR: + // *outEventTypeInt = HiSysEvent::EventType::BEHAVIOR; + // break; + // default: + // HKS_LOG_E("Invalid inEventType!"); + // return HKS_ERROR_INVALID_ARGUMENT; + // } return HKS_SUCCESS; } int WriteEvent(enum EventType eventType, const char *functionName, const struct EventValues *eventValues, const char *extra) { + return 0; int32_t outEventTypeInt = 0; int32_t ret = ConvertToHiSysEventType(eventType, &outEventTypeInt); HKS_IF_NOT_SUCC_LOGE_RETURN(ret, ret, "convert to hiSysEvent event type failed!") - enum HiSysEvent::EventType outEventType = static_cast<enum HiSysEvent::EventType>(outEventTypeInt); + // enum HiSysEvent::EventType outEventType = static_cast<enum HiSysEvent::EventType>(outEventTypeInt); - ret = HiSysEventWrite(HiSysEvent::Domain::HUKS, g_eventName, - outEventType, g_tagFunction, functionName, g_tagUserId, eventValues->userId, g_tagProcessUID, - eventValues->processName, g_tagKeyType, eventValues->keyType, g_tagErrorCode, eventValues->errorCode, - g_tagExtra, extra); - return ret; + // ret = HiSysEventWrite(HiSysEvent::Domain::HUKS, g_eventName, + // outEventType, g_tagFunction, functionName, g_tagUserId, eventValues->userId, g_tagProcessUID, + // eventValues->processName, g_tagKeyType, eventValues->keyType, g_tagErrorCode, eventValues->errorCode, + // g_tagExtra, extra); + // return ret; } diff --git a/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/BUILD.gn b/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/BUILD.gn index ee9d940a..3fc2ef43 100644 --- a/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/BUILD.gn +++ b/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_utils_hitrace_meter_wrapper_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -36,6 +36,6 @@ ohos_static_library("libhuks_utils_hitrace_meter_wrapper_static") { "-Wall", "-Werror", ] - external_deps = [ "hitrace_native:hitrace_meter" ] + # external_deps = [ "hitrace_native:hitrace_meter" ] complete_static_lib = true } diff --git a/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/src/hitrace_meter_wrapper.cpp b/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/src/hitrace_meter_wrapper.cpp index 89dc408e..2872b4c2 100644 --- a/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/src/hitrace_meter_wrapper.cpp +++ b/services/huks_standard/huks_service/main/systemapi_wrap/hitrace_meter_wrapper/src/hitrace_meter_wrapper.cpp @@ -16,17 +16,19 @@ #include "hitrace_meter_wrapper.h" #include "hks_log.h" -#include "hitrace_meter.h" +// #include "hitrace_meter.h" #include <cstdlib> void HksTraceMeterStart(uint64_t label, const char *value, float limit) { - const std::string valueString(value); - StartTrace(label, valueString, limit); + return; + // const std::string valueString(value); + // StartTrace(label, valueString, limit); } void HksTraceMeterFinish(uint64_t label) { - FinishTrace(label); + return; + // FinishTrace(label); } \ No newline at end of file diff --git a/services/huks_standard/huks_service/main/systemapi_wrap/useridm/BUILD.gn b/services/huks_standard/huks_service/main/systemapi_wrap/useridm/BUILD.gn index c7b42fd1..36359b4b 100644 --- a/services/huks_standard/huks_service/main/systemapi_wrap/useridm/BUILD.gn +++ b/services/huks_standard/huks_service/main/systemapi_wrap/useridm/BUILD.gn @@ -18,17 +18,17 @@ config("huks_config") { } ohos_static_library("libhuks_service_systemapi_wrap_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] @@ -36,7 +36,7 @@ ohos_static_library("libhuks_service_systemapi_wrap_static") { deps = [ "//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static", "//base/security/huks/utils/condition:libhuks_utils_condition_static", - "//base/useriam/user_auth_framework/frameworks/native/client:userauth_client", + # "//base/useriam/user_auth_framework/frameworks/native/client:userauth_client", ] external_deps = [ diff --git a/test/reliability/BUILD.gn b/test/reliability/BUILD.gn index 5e0c4be0..26005ad8 100644 --- a/test/reliability/BUILD.gn +++ b/test/reliability/BUILD.gn @@ -29,7 +29,7 @@ ohos_reliabilitytest("huks_stability_test") { ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/test/unittest/huks_standard_test/module_test/BUILD.gn b/test/unittest/huks_standard_test/module_test/BUILD.gn index 72a30bb5..9bc1a0ac 100644 --- a/test/unittest/huks_standard_test/module_test/BUILD.gn +++ b/test/unittest/huks_standard_test/module_test/BUILD.gn @@ -170,7 +170,7 @@ ohos_unittest("huks_module_test") { ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HUKS_LOG_ENABLE_", ] @@ -197,7 +197,7 @@ ohos_unittest("huks_module_test") { if (support_jsapi) { sources += [ "//base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_service/os_dependency/sa/src/huks_event_observer_test.cpp" ] external_deps += [ - "ability_base:want", + # "ability_base:want", "common_event_service:cesfwk_innerkits", ] } diff --git a/test/unittest/huks_standard_test/module_test/inner_kits_passthrough/BUILD.gn b/test/unittest/huks_standard_test/module_test/inner_kits_passthrough/BUILD.gn index 0bfdb0dd..210dc0ec 100644 --- a/test/unittest/huks_standard_test/module_test/inner_kits_passthrough/BUILD.gn +++ b/test/unittest/huks_standard_test/module_test/inner_kits_passthrough/BUILD.gn @@ -124,9 +124,9 @@ config("hilog_dir") { [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include" ] } ohos_static_library("libhukssdk_static") { - sanitize = { - integer_overflow = true - } + # sanitize = { + # integer_overflow = true + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":public_huks_config" ] @@ -180,7 +180,7 @@ ohos_static_library("libhukssdk_static") { if (support_jsapi) { external_deps += [ "os_account:os_account_innerkits" ] external_deps += [ - "ability_base:want", + # "ability_base:want", "common_event_service:cesfwk_innerkits", "ipc:ipc_core", ] diff --git a/test/unittest/huks_standard_test/module_test/mock/BUILD.gn b/test/unittest/huks_standard_test/module_test/mock/BUILD.gn index 5d80576b..c2c2a609 100644 --- a/test/unittest/huks_standard_test/module_test/mock/BUILD.gn +++ b/test/unittest/huks_standard_test/module_test/mock/BUILD.gn @@ -34,7 +34,7 @@ ohos_unittest("huks_mock_test") { sources += [ "//base/security/huks/test/unittest/huks_standard_test/module_test/mock/ipc/src/huks_access_test.cpp" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HUKS_LOG_ENABLE_", ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] diff --git a/test/unittest/huks_standard_test/module_test/service_test/huks_service/os_dependency/idl/ipc/BUILD.gn b/test/unittest/huks_standard_test/module_test/service_test/huks_service/os_dependency/idl/ipc/BUILD.gn index c670243a..6a855a55 100644 --- a/test/unittest/huks_standard_test/module_test/service_test/huks_service/os_dependency/idl/ipc/BUILD.gn +++ b/test/unittest/huks_standard_test/module_test/service_test/huks_service/os_dependency/idl/ipc/BUILD.gn @@ -23,7 +23,7 @@ ohos_unittest("service_ipc_test") { sources = [ "src/huks_ipc_serialization_test.cpp" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HUKS_LOG_ENABLE_", ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] diff --git a/test/unittest/huks_standard_test/module_test/service_test/huks_service/systemapi_wrap/useridm_test/BUILD.gn b/test/unittest/huks_standard_test/module_test/service_test/huks_service/systemapi_wrap/useridm_test/BUILD.gn index 082e4d02..aaeee542 100644 --- a/test/unittest/huks_standard_test/module_test/service_test/huks_service/systemapi_wrap/useridm_test/BUILD.gn +++ b/test/unittest/huks_standard_test/module_test/service_test/huks_service/systemapi_wrap/useridm_test/BUILD.gn @@ -23,7 +23,7 @@ ohos_unittest("huks_useridm_wrap_test") { sources = [ "src/hks_useridm_api_wrap_test.cpp" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HUKS_LOG_ENABLE_", ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] diff --git a/test/unittest/huks_standard_test/storage_multithread_test/BUILD.gn b/test/unittest/huks_standard_test/storage_multithread_test/BUILD.gn index c8a9b7a3..5ba8f0a9 100644 --- a/test/unittest/huks_standard_test/storage_multithread_test/BUILD.gn +++ b/test/unittest/huks_standard_test/storage_multithread_test/BUILD.gn @@ -19,7 +19,7 @@ ohos_unittest("huks_multithread_test") { module_out_path = module_output_path defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/test/unittest/huks_standard_test/three_stage_test/BUILD.gn b/test/unittest/huks_standard_test/three_stage_test/BUILD.gn index 2ef2fa79..0395c1e9 100644 --- a/test/unittest/huks_standard_test/three_stage_test/BUILD.gn +++ b/test/unittest/huks_standard_test/three_stage_test/BUILD.gn @@ -79,7 +79,7 @@ ohos_unittest("huks_UT_test") { ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HUKS_LOG_ENABLE_", ] diff --git a/utils/condition/BUILD.gn b/utils/condition/BUILD.gn index da41ca08..2c8e8795 100644 --- a/utils/condition/BUILD.gn +++ b/utils/condition/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_utils_condition_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -33,7 +33,7 @@ ohos_static_library("libhuks_utils_condition_static") { ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/utils/crypto_adapter/BUILD.gn b/utils/crypto_adapter/BUILD.gn index 381f5b82..8a067f0f 100644 --- a/utils/crypto_adapter/BUILD.gn +++ b/utils/crypto_adapter/BUILD.gn @@ -19,17 +19,17 @@ config("huks_config") { } ohos_static_library("libhuks_utils_client_service_adapter_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] include_dirs = [ "//third_party/openssl/include/" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/utils/file_operator/BUILD.gn b/utils/file_operator/BUILD.gn index 5864fdf3..8666d7f4 100644 --- a/utils/file_operator/BUILD.gn +++ b/utils/file_operator/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_utils_file_operator_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -33,7 +33,7 @@ ohos_static_library("libhuks_utils_file_operator_static") { ] configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] diff --git a/utils/list/BUILD.gn b/utils/list/BUILD.gn index ba8d1492..95c65d59 100644 --- a/utils/list/BUILD.gn +++ b/utils/list/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_utils_list_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] diff --git a/utils/mutex/BUILD.gn b/utils/mutex/BUILD.gn index f4db2132..94b5a904 100644 --- a/utils/mutex/BUILD.gn +++ b/utils/mutex/BUILD.gn @@ -19,11 +19,11 @@ config("huks_config") { } ohos_static_library("libhuks_utils_mutex_static") { - sanitize = { - integer_overflow = true - cfi = true - debug = false - } + # sanitize = { + # integer_overflow = true + # cfi = true + # debug = false + # } subsystem_name = "security" part_name = "huks" public_configs = [ ":huks_config" ] @@ -33,7 +33,7 @@ ohos_static_library("libhuks_utils_mutex_static") { "//base/security/huks/interfaces/innerkits/huks_standard/main/include", ] defines = [ - "L2_STANDARD", + # "L2_STANDARD", "_HARDWARE_ROOT_KEY_", "_HUKS_LOG_ENABLE_", ] -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2