Home
last modified time | relevance | path

Searched refs:digestMethod (Results 1 – 25 of 33) sorted by relevance

12

/base/update/updater/services/package/pkg_algorithm/
Dpkg_algo_sign.h47 …nAlgorithm(const std::string keyPath, uint8_t digestMethod) : keyName_(keyPath), digestMethod_(dig… in SignAlgorithm() argument
63 …VerifyAlgorithm(const std::string keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMe… in VerifyAlgorithm() argument
78 …gnAlgorithmRsa(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMe… in SignAlgorithmRsa() argument
87 …gnAlgorithmEcc(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMe… in SignAlgorithmEcc() argument
Dpkg_algo_digest.cpp22 size_t DigestAlgorithm::GetDigestLen(int8_t digestMethod) in GetDigestLen() argument
25 if (digestMethod < PKG_DIGEST_TYPE_MAX) { in GetDigestLen()
26 return digestLens[digestMethod]; in GetDigestLen()
31 size_t DigestAlgorithm::GetSignatureLen(int8_t digestMethod) in GetSignatureLen() argument
34 if (digestMethod < PKG_DIGEST_TYPE_MAX) { in GetSignatureLen()
35 return signatureLens[digestMethod]; in GetSignatureLen()
Dpkg_algorithm.h49 uint8_t digestMethod = 0; member
52 …gAlgorithmContext(PkgContextOffset offset, PkgContextSize size, uint32_t crc, uint8_t digestMethod) in PkgAlgorithmContext()
59 this->digestMethod = digestMethod; in PkgAlgorithmContext()
Dpkg_algorithm.cpp45 if (context.digestMethod == PKG_DIGEST_TYPE_SHA256) { in FinalDigest()
62 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Pack()
109 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Unpack()
155 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in UnpackWithVerify()
Dpkg_algo_digest.h61 static size_t GetDigestLen(int8_t digestMethod);
62 static size_t GetSignatureLen(int8_t digestMethod);
Dpkg_algo_deflate.cpp114 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Pack()
200 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Unpack()
/base/update/updater/test/unittest/package/
Dpackage_unittest.cpp94 pkgInfo.digestMethod = type; in TestPackagePack()
121 GetTestPrivateKeyName(pkgInfo.digestMethod).c_str()); in TestPackagePack()
151 int TestZipPkgCompress(int digestMethod) in TestZipPkgCompress() argument
153 … CreateZipPackage(testFileNames_, TEST_PATH_TO + testZipPackageName, TEST_PATH_FROM, digestMethod); in TestZipPkgCompress()
156 int TestZipPkgDecompress(int digestMethod) in TestZipPkgDecompress() argument
161 GetTestCertName(digestMethod), components); in TestZipPkgDecompress()
180 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestGZipPkgCompress()
186 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestGZipPkgCompress()
189 GetTestPrivateKeyName(pkgInfo.digestMethod), &pkgInfo, files); in TestGZipPkgCompress()
238 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PkgCompress()
[all …]
Dpkg_test.h148 PKG_LOGI("FileInfo [%zu] digestMethod: %d \n", i, info->digestMethod); in ExtractFile()
154 const std::string packageName, const std::string &base, int digestMethod) in CreateZipPackage() argument
164 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in CreateZipPackage()
171 pkgInfo.digestMethod = digestMethod; in CreateZipPackage()
173 …int32_t ret = pkgManager->CreatePackage(packageName, GetTestPrivateKeyName(digestMethod), &pkgInfo… in CreateZipPackage()
Dpkg_manager_unittest.cpp104 pkgInfo.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in GetUpgradePkgInfo()
123 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in GetUpgradePkgInfo()
252 info.fileInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestCreatePackageInvalidFile()
289 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PackageInvalidFile()
293 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestLz4PackageInvalidFile()
314 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PackageInvalidPkgType()
318 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestLz4PackageInvalidPkgType()
337 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestZipPackageInvalidFile()
342 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestZipPackageInvalidFile()
372 lz4Info.fileInfo.digestMethod = PKG_DIGEST_TYPE_NONE; in TestDecompressLz4plus()
[all …]
/base/update/updater/test/fuzztest/package_fuzzer/
Dpackage_fuzzer.cpp91 pkgInfo.digestMethod = type; in TestPackagePack()
116 GetFuzzPrivateKeyName(pkgInfo.digestMethod).c_str()); in TestPackagePack()
129 int TestZipPkgCompress(int digestMethod) in TestZipPkgCompress() argument
131 … CreateZipPackage(testFileNames_, TEST_PATH_TO + testZipPackageName, TEST_PATH_FROM, digestMethod); in TestZipPkgCompress()
148 int TestZipPkgDecompress(int digestMethod) in TestZipPkgDecompress() argument
152 GetFuzzCertName(digestMethod), componentsList); in TestZipPkgDecompress()
168 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestGZipPkgCompress()
174 info.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestGZipPkgCompress()
177 GetFuzzPrivateKeyName(info.digestMethod), &info, files); in TestGZipPkgCompress()
219 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PkgCompress()
[all …]
Dpkg_fuzz_test.h168 PKG_LOGI("FileInfo [%zu] digestMethod: %d \n", num, info->digestMethod); in ExtractFile()
174 const std::string pkgName, const std::string &base, int digestMethod) in CreateZipPackage() argument
183 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in CreateZipPackage()
190 pkgInfo.digestMethod = digestMethod; in CreateZipPackage()
192 …int32_t ret = pkgManager->CreatePackage(pkgName, GetFuzzPrivateKeyName(digestMethod), &pkgInfo, fi… in CreateZipPackage()
/base/update/updater/interfaces/kits/packages/
Dpackage.cpp50 upgradePackageInfo->pkgInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo()
66 info->fileInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo()
83 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetZipPkgInfo()
92 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in GetZipPkgInfo()
103 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetLz4PkgInfo()
112 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in GetLz4PkgInfo()
/base/update/updater/services/package/pkg_package/
Dpkg_pkgfile.cpp147 localFileInfo->digestMethod = fileInfo->digestMethod; in Init()
170 void PkgFileImpl::AddSignData(uint8_t digestMethod, size_t currOffset, size_t &signOffset) in AddSignData() argument
173 if (digestMethod == PKG_DIGEST_TYPE_NONE) { in AddSignData()
Dpkg_lz4file.cpp63 0, fileInfo_.fileInfo.digestMethod in Pack()
93 0, fileInfo_.fileInfo.digestMethod in Unpack()
115 fileInfo_.fileInfo.digestMethod = PKG_DIGEST_TYPE_NONE; in DecodeHeader()
172 AddSignData(pkgInfo_.digestMethod, currentOffset_, offset); in SavePackage()
Dpkg_lz4file.h61 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256; in PkgFileImpl()
Dpkg_gzipfile.cpp142 0, fileInfo_.fileInfo.digestMethod in Pack()
215 0, fileInfo_.fileInfo.digestMethod in Unpack()
280 fileInfo_.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in DecodeHeader()
351 AddSignData(pkgInfo_.digestMethod, currentOffset_, offset); in SavePackage()
Dpkg_upgradefile.cpp88 return DigestAlgorithm::GetDigestLen(pkgInfo_.pkgInfo.digestMethod); in GetDigestLen()
402 if (pkgInfo_.pkgInfo.digestMethod == PKG_DIGEST_TYPE_SHA384) { in ReadPackageInfo()
681 pkgInfo_.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in ParsePkgHeaderToTlv()
686 pkgInfo_.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA384; in ParsePkgHeaderToTlv()
731 algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(pkgInfo_.pkgInfo.digestMethod); in ReadUpgradePkgHeader()
843 0, fileInfo_.fileInfo.digestMethod in Pack()
896 fileInfo_.fileInfo.digestMethod = PKG_DIGEST_TYPE_NONE; in DecodeHeader()
936 0, fileInfo_.fileInfo.digestMethod in Unpack()
1005 if (pkgInfo_.pkgInfo.digestMethod < PKG_DIGEST_TYPE_MAX) { in GetPackageTlvType()
1006 return packageTlvType[pkgInfo_.pkgInfo.digestMethod]; in GetPackageTlvType()
Dpkg_gzipfile.h68 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256; in PkgFileImpl()
Dpkg_pkgfile.h86 void AddSignData(uint8_t digestMethod, size_t currOffset, size_t &signOffset);
/base/update/updater/test/fuzztest/fuzz_src_data/
DTestDecompressGzip.new.gz
/base/update/updater/test/unittest/test_data/applypatch/
DTestDecompressGzip.new.gz
/base/update/updater/services/package/pkg_manager/
Dpkg_managerImpl.cpp419 return Verify(info->digestMethod, digest, signature); in LoadPackageWithStream()
768 …uint8_t digestMethod, uint8_t flags, std::vector<std::vector<uint8_t>> &digestInfos, size_t hashBu… in DoCreatePkgStream() argument
771 size_t digestLen = DigestAlgorithm::GetDigestLen(digestMethod); in DoCreatePkgStream()
772 size_t signatureLen = DigestAlgorithm::GetSignatureLen(digestMethod); in DoCreatePkgStream()
774 …estAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(digestMethod); in DoCreatePkgStream()
781 …gorithm::DigestAlgorithmPtr algorithmInner = PkgAlgorithmFactory::GetDigestAlgorithm(digestMethod); in DoCreatePkgStream()
805 if (digestMethod != PKG_DIGEST_TYPE_SHA256) { in DoCreatePkgStream()
816 int32_t PkgManagerImpl::Verify(uint8_t digestMethod, const std::vector<uint8_t> &digest, in DoCreatePkgStream() argument
820 signVerifyKeyName_, digestMethod); in DoCreatePkgStream()
838 size_t digestLen = DigestAlgorithm::GetDigestLen(info->digestMethod); in DoCreatePkgStream()
[all …]
Dpkg_manager_impl.h119 …int32_t Verify(uint8_t digestMethod, const std::vector<uint8_t> &digest, const std::vector<uint8_t…
125 …uint8_t digestMethod, uint8_t flags, std::vector<std::vector<uint8_t>> &digestInfos, size_t hashBu…
/base/update/updater/services/include/package/
Dpkg_info_utils.h71 uint8_t digestMethod; member
82 uint8_t digestMethod = 0; member
/base/update/updater/interfaces/kits/include/package/
Dpackage.h76 uint8_t digestMethod = PKG_DIGEST_TYPE_SHA256; member

12