diff --git a/bundle.json b/bundle.json index 55047c6f28450b98d54125f4487ca1d848da0eb5..21663e031b5f79c63810f5baf4b594de6339ba96 100644 --- a/bundle.json +++ b/bundle.json @@ -19,7 +19,8 @@ "features": [ "code_signature_support_oh_code_sign", "code_signature_enable_xpm_mode", - "code_signature_support_oh_release_app" + "code_signature_support_oh_release_app", + "code_signature_support_app_allow_list" ], "adapted_system_type": [ "standard" ], "rom": "1024KB", diff --git a/code_signature.gni b/code_signature.gni index cb5eae75c575f49b4d75336d51357400dcdcbc10..261f38a81c6b86590beb4b85611bc260c3157a83 100644 --- a/code_signature.gni +++ b/code_signature.gni @@ -24,6 +24,7 @@ declare_args() { code_signature_support_oh_code_sign = false code_signature_enable_xpm_mode = 0 code_signature_support_oh_release_app = false + code_signature_support_app_allow_list = false code_signature_screenlock_mgr_enable = false if (defined(global_parts_info) && defined(global_parts_info.theme_screenlock_mgr)) { diff --git a/interfaces/innerkits/code_sign_attr_utils/BUILD.gn b/interfaces/innerkits/code_sign_attr_utils/BUILD.gn index cdac4be899c5f83c773be8ec8c58b24a11d73ee2..bad960d13b443a9b793110bb3a8dc487956e1f6e 100755 --- a/interfaces/innerkits/code_sign_attr_utils/BUILD.gn +++ b/interfaces/innerkits/code_sign_attr_utils/BUILD.gn @@ -19,6 +19,11 @@ config("public_attr_utils_configs") { } ohos_static_library("libcode_sign_attr_utils") { + defines = [] + if (code_signature_support_app_allow_list) { + defines += [ "SUPPORT_APP_ALLOW_LIST" ] + } + sources = [ "src/code_sign_attr_utils.c", "src/ownerid_utils.cpp", diff --git a/interfaces/innerkits/code_sign_attr_utils/src/ownerid_utils.cpp b/interfaces/innerkits/code_sign_attr_utils/src/ownerid_utils.cpp index bcc58c423ddf35a12685a14fac3c059850ca3755..e0d0f8224a0f3e2aed7038aedc6ab90e66d41065 100644 --- a/interfaces/innerkits/code_sign_attr_utils/src/ownerid_utils.cpp +++ b/interfaces/innerkits/code_sign_attr_utils/src/ownerid_utils.cpp @@ -25,9 +25,15 @@ #define VALUE_MAX_LEN 32 // the list will be removed before 930 -static const std::unordered_set g_tempAllowList; +static const std::unordered_set g_tempAllowList { +#ifdef SUPPORT_APP_ALLOW_LIST +#endif +}; -static const std::unordered_set g_secureShieldAllowList; +static const std::unordered_set g_secureShieldAllowList { +#ifdef SUPPORT_APP_ALLOW_LIST +#endif +}; static uint32_t IsSecureShieldModeOn() { @@ -59,4 +65,4 @@ uint32_t ConvertIdType(int idType, const char *ownerId) } } return idType; -} \ No newline at end of file +}