From b9d8a8b5c45a9a6b7441ff1bba9b431a4b2c13a0 Mon Sep 17 00:00:00 2001 From: Forrest <5238233+y0y0@user.noreply.gitee.com> Date: Wed, 19 Jun 2024 16:54:23 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=20:=20=E8=BF=99=E9=87=8C=E8=BF=94?= =?UTF-8?q?=E5=9B=9Efalse=E7=AD=89=E5=90=8C=E4=BA=8E=E8=BF=94=E5=9B=9EVERI?= =?UTF-8?q?FY=5FSUCCESS=EF=BC=8C=E5=8D=B3=E8=BF=94=E5=9B=9E=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Forrest <943759412@qq.com> --- .../innerkits/appverify/include/interfaces/hap_verify_result.h | 1 + interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/innerkits/appverify/include/interfaces/hap_verify_result.h b/interfaces/innerkits/appverify/include/interfaces/hap_verify_result.h index b793e83..0040c2f 100644 --- a/interfaces/innerkits/appverify/include/interfaces/hap_verify_result.h +++ b/interfaces/innerkits/appverify/include/interfaces/hap_verify_result.h @@ -47,6 +47,7 @@ enum HapVerifyResultCode { NO_PROFILE_BLOCK_FAIL = -12, VERIFY_SIGNATURE_FAIL = -13, VERIFY_SOURCE_INIT_FAIL = -14, + PARSE_PKCS7_PACKAGE_FAIL = -15, }; enum GetOptionalBlockResultCode { diff --git a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp index ae2af2e..9148c66 100644 --- a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp +++ b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp @@ -437,7 +437,7 @@ int32_t HapVerifyV2::ParseHapProfile(const std::string& filePath, HapVerifyResul Pkcs7Context profileContext; if (!HapVerifyOpensslUtils::ParsePkcs7Package(pkcs7Block, pkcs7Len, profileContext)) { HAPVERIFY_LOG_ERROR(LABEL, "parse pkcs7 failed"); - return false; + return PARSE_PKCS7_PACKAGE_FAIL; } std::string profile = std::string(profileContext.content.GetBufferPtr(), profileContext.content.GetCapacity()); HAPVERIFY_LOG_DEBUG(LABEL, "profile is %{public}s", profile.c_str()); -- Gitee