From 793683f5bfb4b0e59b342889e1845d6840d53b09 Mon Sep 17 00:00:00 2001 From: daiyujia Date: Sat, 22 Feb 2025 10:27:21 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#IBO1L5=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=E6=8C=91=E5=8D=95?= =?UTF-8?q?5.0.3=20Sig:bundleManager=20Feature=20or=20Bugfix:BugFix=20Bina?= =?UTF-8?q?ry=20Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: daiyujia Change-Id: I64aeaf8b4465fc2d29c366e28ec9a25f72051fb2 --- .../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 e6c109b..2f9def5 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 5161f7c..8bd1717 100644 --- a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp +++ b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp @@ -434,7 +434,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; @@ -443,7 +443,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