diff --git a/interfaces/innerkits/appverify/include/interfaces/hap_verify_result.h b/interfaces/innerkits/appverify/include/interfaces/hap_verify_result.h index b793e837b1bfa47f9d35dd64b3852ac097bf6350..0040c2fe4e85b541c5f4a609a51f569c636cc9a9 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 ae2af2e6a7f5b4cb93c664df1dd55be75fdd08ef..9148c6635304b81f542948c9d31dc33d1b4029a6 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());