From 0b174ecb1a0849026e571fc1107a6c8ae709b05e Mon Sep 17 00:00:00 2001 From: zhouliting Date: Fri, 11 Jul 2025 10:55:26 +0800 Subject: [PATCH 1/2] Add a signature exception log Signed-off-by: zhouliting --- services/local_code_sign/src/local_sign_key.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/services/local_code_sign/src/local_sign_key.cpp b/services/local_code_sign/src/local_sign_key.cpp index 738ead5..0d67079 100644 --- a/services/local_code_sign/src/local_sign_key.cpp +++ b/services/local_code_sign/src/local_sign_key.cpp @@ -121,6 +121,7 @@ bool LocalSignKey::UpdateKey() } int32_t ret = HksKeyExist(&LOCAL_SIGN_KEY_ALIAS, paramSet.GetParamSet()); if (ret == HKS_ERROR_NOT_EXIST) { + LOG_DEBUG("if the key does not exist, update the key, ret is %{public}d!", ret); sptr bundleMgr = Connect(); if (bundleMgr == nullptr) { LOG_ERROR("get bundleMgr failed"); -- Gitee From 6217b2ec0b23006c33ba2e1d2323cfe3cdae7dca Mon Sep 17 00:00:00 2001 From: zhouliting Date: Fri, 11 Jul 2025 10:56:53 +0800 Subject: [PATCH 2/2] Add a signature exception log Signed-off-by: zhouliting --- services/local_code_sign/src/local_sign_key.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/local_code_sign/src/local_sign_key.cpp b/services/local_code_sign/src/local_sign_key.cpp index 0d67079..4d4fcd5 100644 --- a/services/local_code_sign/src/local_sign_key.cpp +++ b/services/local_code_sign/src/local_sign_key.cpp @@ -121,10 +121,10 @@ bool LocalSignKey::UpdateKey() } int32_t ret = HksKeyExist(&LOCAL_SIGN_KEY_ALIAS, paramSet.GetParamSet()); if (ret == HKS_ERROR_NOT_EXIST) { - LOG_DEBUG("if the key does not exist, update the key, ret is %{public}d!", ret); + LOG_INFO("The key does not exist, update the key, ret is %{public}d!", ret); sptr bundleMgr = Connect(); if (bundleMgr == nullptr) { - LOG_ERROR("get bundleMgr failed"); + LOG_ERROR("Get bundleMgr failed"); return false; } int32_t result = bundleMgr->ResetAllAOT(); @@ -133,6 +133,7 @@ bool LocalSignKey::UpdateKey() return false; } if (!GenerateKey()) { + LOG_ERROR("GenerateKey fail."); return false; } } else if (ret != HKS_SUCCESS) { -- Gitee