From 88d6ac610fd1e4bf8185f224c8d588e0cdbc5c4d Mon Sep 17 00:00:00 2001 From: daiyujia Date: Thu, 9 Jan 2025 21:08:14 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#IBGUFG=20Description:=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=A1=A8app=5Fprovision=5Finfo=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=9C=E5=BA=95=E8=83=BD=E5=8A=9B=20Sig:bundleManag?= =?UTF-8?q?er=20Feature=20or=20Bugfix:BugFix=20Binary=20Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: daiyujia Change-Id: I0520414dea5de7b2b89815015f8fa2f5f83b92bf --- .../innerkits/appverify/include/interfaces/hap_verify.h | 3 ++- interfaces/innerkits/appverify/include/verify/hap_verify_v2.h | 2 +- interfaces/innerkits/appverify/src/interfaces/hap_verify.cpp | 4 ++-- interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/interfaces/innerkits/appverify/include/interfaces/hap_verify.h b/interfaces/innerkits/appverify/include/interfaces/hap_verify.h index 9197675..c775291 100644 --- a/interfaces/innerkits/appverify/include/interfaces/hap_verify.h +++ b/interfaces/innerkits/appverify/include/interfaces/hap_verify.h @@ -27,7 +27,8 @@ namespace Verify { DLL_EXPORT bool EnableDebugMode(); DLL_EXPORT void DisableDebugMode(); DLL_EXPORT int32_t HapVerify(const std::string& filePath, HapVerifyResult& hapVerifyResult, bool readFile = false); -DLL_EXPORT int32_t ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result); +DLL_EXPORT int32_t ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result, + bool readFile = false); DLL_EXPORT int32_t ParseHapSignatureInfo(const std::string& filePath, SignatureInfo &hapSignInfo); extern "C" DLL_EXPORT int32_t ParseBundleNameAndAppIdentifier(const int32_t fileFd, std::string &bundleName, std::string &appIdentifier); diff --git a/interfaces/innerkits/appverify/include/verify/hap_verify_v2.h b/interfaces/innerkits/appverify/include/verify/hap_verify_v2.h index c2aabbb..bbac732 100644 --- a/interfaces/innerkits/appverify/include/verify/hap_verify_v2.h +++ b/interfaces/innerkits/appverify/include/verify/hap_verify_v2.h @@ -31,7 +31,7 @@ class HapVerifyV2 { public: int32_t Verify(const std::string& filePath, HapVerifyResult& hapVerifyV1Result, bool readFile = false); int32_t Verify(const int32_t fileFd, HapVerifyResult& hapVerifyV1Result); - int32_t ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result); + int32_t ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result, bool readFile = false); int32_t ParseHapSignatureInfo(const std::string& filePath, SignatureInfo &hapSignInfo); private: diff --git a/interfaces/innerkits/appverify/src/interfaces/hap_verify.cpp b/interfaces/innerkits/appverify/src/interfaces/hap_verify.cpp index e0b3bed..9d366ff 100644 --- a/interfaces/innerkits/appverify/src/interfaces/hap_verify.cpp +++ b/interfaces/innerkits/appverify/src/interfaces/hap_verify.cpp @@ -93,10 +93,10 @@ int32_t HapVerify(const std::string& filePath, HapVerifyResult& hapVerifyResult, return hapVerifyV2.Verify(filePath, hapVerifyResult, readFile); } -int32_t ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result) +int32_t ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result, bool readFile) { HapVerifyV2 hapVerifyV2; - return hapVerifyV2.ParseHapProfile(filePath, hapVerifyV1Result); + return hapVerifyV2.ParseHapProfile(filePath, hapVerifyV1Result, readFile); } int32_t ParseHapSignatureInfo(const std::string& filePath, SignatureInfo &hapSignInfo) diff --git a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp index a1193f8..06a4c09 100644 --- a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp +++ b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp @@ -439,7 +439,7 @@ bool HapVerifyV2::GetDigestAndAlgorithm(Pkcs7Context& digest) return true; } -int32_t HapVerifyV2::ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result) +int32_t HapVerifyV2::ParseHapProfile(const std::string& filePath, HapVerifyResult& hapVerifyV1Result, bool readFile) { HAPVERIFY_LOG_INFO("start to ParseHapProfile"); std::string standardFilePath; @@ -448,7 +448,7 @@ int32_t HapVerifyV2::ParseHapProfile(const std::string& filePath, HapVerifyResul } RandomAccessFile hapFile; - if (!hapFile.Init(standardFilePath)) { + if (!hapFile.Init(standardFilePath, readFile)) { HAPVERIFY_LOG_ERROR("open standard file failed"); return OPEN_FILE_ERROR; } -- Gitee