/base/startup/init/simulator/parameter/src/param_impl_posix/ |
H A D | param_impl_posix.c | 72 char* keyPath = (char *)calloc(1, MAX_KEY_PATH + 1); in GetSysParam() local 73 if (keyPath == NULL) { in GetSysParam() 76 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, "%s%s", DATA_PATH, key) < 0) { in GetSysParam() 77 free(keyPath); in GetSysParam() 81 if (stat(keyPath, &info) != F_OK) { in GetSysParam() 82 free(keyPath); in GetSysParam() 86 free(keyPath); in GetSysParam() 89 int fd = open(keyPath, O_RDONLY, S_IRUSR); in GetSysParam() 90 free(keyPath); in GetSysParam() 91 keyPath in GetSysParam() 111 char* keyPath = (char *)calloc(1, MAX_KEY_PATH + 1); SetSysParam() local [all...] |
/base/update/updater/services/package/pkg_algorithm/ |
H A D | pkg_algo_sign.h | 47 SignAlgorithm(const std::string keyPath, uint8_t digestMethod) : keyName_(keyPath), digestMethod_(digestMethod) {}
in SignAlgorithm() argument 63 VerifyAlgorithm(const std::string keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMethod) {}
in VerifyAlgorithm() argument 78 SignAlgorithmRsa(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMethod) {}
in SignAlgorithmRsa() argument 87 SignAlgorithmEcc(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMethod) {}
in SignAlgorithmEcc() argument
|
/base/update/updater/interfaces/kits/include/package/ |
H A D | package.h | 107 * @param keyPath path of the key used for signature
111 const char *path, const char *keyPath);
117 * @param keyPath path of the key used for verification
123 int32_t VerifyPackage(const char *packagePath, const char *keyPath,
130 * @param keyPath 运来校验的key的文件名
134 int32_t VerifyPackageWithCallback(const std::string &packagePath, const std::string &keyPath,
141 * @param keyPath path of the key used for verification
146 int32_t ExtraPackageDir(const char *packagePath, const char *keyPath, const char *dir,
153 * @param keyPath path of the key used for verification
158 int32_t ExtraPackageFile(const char *packagePath, const char *keyPath, cons [all...] |
/base/update/updateservice/services/engine/src/ |
H A D | update_service_local_updater.cpp | 43 int32_t UpdateServiceLocalUpdater::VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, in VerifyUpgradePackage() argument 47 int32_t ret = ::VerifyPackageWithCallback(packagePath.c_str(), keyPath.c_str(), in VerifyUpgradePackage() 49 ENGINE_LOGI("VerifyUpgradePackage %s, %s, %{public}d", packagePath.c_str(), keyPath.c_str(), ret); in VerifyUpgradePackage()
|
H A D | update_service.cpp | 336 int32_t UpdateService::VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, in VerifyUpgradePackage() argument 344 return localUpdater->VerifyUpgradePackage(packagePath, keyPath, businessError); in VerifyUpgradePackage()
|
/base/update/updater/test/fuzztest/package_fuzzer/ |
H A D | package_fuzzer.cpp | 198 std::string keyPath = ""; in TestVerifyPackageWithCallback() local 199 ret = VerifyPackageWithCallback(path.c_str(), keyPath.c_str(), in TestVerifyPackageWithCallback() 255 const std::string keyPath = "/data/fuzz/test/signing_cert.crt"; in FuzzVerifyPackage() local 259 VerifyPackage(dataInfo.c_str(), keyPath.c_str(), "", digest.data(), digest.capacity()); in FuzzVerifyPackage() 261 VerifyPackage(pkgPath.c_str(), keyPath.c_str(), dataInfo.c_str(), digest.data(), digest.capacity()); in FuzzVerifyPackage() 262 VerifyPackage(pkgPath.c_str(), keyPath.c_str(), "", data, size); in FuzzVerifyPackage() 264 VerifyPackageWithCallback(dataInfo.c_str(), keyPath.c_str(), in FuzzVerifyPackage() 268 ExtraPackageDir(dataInfo.c_str(), keyPath.c_str(), nullptr, pkgDir.c_str()); in FuzzVerifyPackage() 270 ExtraPackageDir(pkgPath.c_str(), keyPath.c_str(), dataInfo.c_str(), pkgDir.c_str()); in FuzzVerifyPackage() 271 ExtraPackageDir(pkgPath.c_str(), keyPath in FuzzVerifyPackage() [all...] |
/base/update/updater/interfaces/kits/packages/ |
H A D | package.cpp | 141 const char *keyPath)
in CreatePackage() 143 if (pkgInfoExt == nullptr || path == nullptr || keyPath == nullptr || pkgInfoExt->entryCount > compInfo.size()) {
in CreatePackage() 160 ret = manager->CreatePackage(path, keyPath, &upgradePackageInfo.pkgInfo, files);
in CreatePackage() 170 ret = manager->CreatePackage(path, keyPath, &info, files);
in CreatePackage() 179 ret = manager->CreatePackage(path, keyPath, &info, files);
in CreatePackage() 192 const char *keyPath,
in VerifyPackage() 197 if (packagePath == nullptr || keyPath == nullptr || version == nullptr) {
in VerifyPackage() 208 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer,
in VerifyPackage() 215 const std::string &keyPath, std::function<void(int32_t result, uint32_t percent)> cb)
in VerifyPackageWithCallback() 217 if (packagePath.empty() || keyPath in VerifyPackageWithCallback() 138 CreatePackage(const UpgradePkgInfoExt *pkgInfoExt, std::vector<ComponentInfoExt> &compInfo, const char *path, const char *keyPath) CreatePackage() argument 191 VerifyPackage(const char *packagePath, const char *keyPath, const char *version, const uint8_t *digest, size_t size) VerifyPackage() argument 214 VerifyPackageWithCallback(const std::string &packagePath, const std::string &keyPath, std::function<void(int32_t result, uint32_t percent)> cb) VerifyPackageWithCallback() argument 236 ExtraPackageDir(const char *packagePath, [[maybe_unused]] const char *keyPath, const char *dir, const char *outPath) ExtraPackageDir() argument 275 ExtraPackageFile(const char *packagePath, [[maybe_unused]] const char *keyPath, const char *file, const char *outPath) ExtraPackageFile() argument [all...] |
/base/update/updater/services/package/pkg_verify/ |
H A D | pkg_verify_util.h | 33 const std::string &keyPath) const; 34 int32_t VerifyAccPackageSign(const PkgStreamPtr pkgStream, const std::string &keyPath) const;
|
H A D | pkg_verify_util.cpp | 36 const std::string & keyPath) const in VerifySourceDigest() 41 keyPath, PKG_DIGEST_TYPE_SHA256); in VerifySourceDigest() 55 int32_t PkgVerifyUtil::VerifyAccPackageSign(const PkgStreamPtr pkgStream, const std::string &keyPath) const in VerifyAccPackageSign() 75 return VerifySourceDigest(signature, sourceDigest, keyPath); in VerifyAccPackageSign()
|
/base/update/updater/test/unittest/script/ |
H A D | script_unittest.h | 40 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, 45 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, 58 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath, 109 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, 136 int32_t VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) override
|
/base/update/updateservice/interfaces/inner_api/feature/update/api/local_updater/ |
H A D | iservice_local_updater.h | 32 virtual int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,
|
/base/update/updater/test/unittest/package/ |
H A D | pkg_verify_unittest.cpp | 59 std::string keyPath = "invalid_key"; in TestExtraPackageFile() local 62 ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), outPath.c_str()); in TestExtraPackageFile() 66 keyPath = "/data/updater/src/signing_cert.crt"; in TestExtraPackageFile() 68 ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), testPackagePath.c_str()); in TestExtraPackageFile() 79 std::string keyPath = "invalid_key"; in TestExtraPackageDir() local 81 ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, outPath.c_str()); in TestExtraPackageDir() 85 keyPath = "/data/updater/src/signing_cert.crt"; in TestExtraPackageDir() 86 ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, testPackagePath.c_str()); in TestExtraPackageDir()
|
H A D | package_unittest.cpp | 212 std::string keyPath = ""; in TestVerifyPackageWithCallback() local 213 ret = VerifyPackageWithCallback(path.c_str(), keyPath.c_str(), in TestVerifyPackageWithCallback()
|
/base/update/updater/services/package/pkg_manager/ |
H A D | pkg_manager_impl.h | 46 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, const std::string &version, 49 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, 66 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, 78 int32_t VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) override; 81 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
|
H A D | pkg_managerImpl.cpp | 278 int32_t PkgManagerImpl::LoadPackage(const std::string &packagePath, const std::string &keyPath,
in LoadPackage() argument 285 if (SetSignVerifyKeyName(keyPath) != PKG_SUCCESS) {
in LoadPackage() 395 int32_t PkgManagerImpl::LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
in LoadPackageWithStream() argument 398 int32_t ret = SetSignVerifyKeyName(keyPath);
in LoadPackageWithStream() 685 int32_t PkgManagerImpl::VerifyPackage(const std::string &packagePath, const std::string &keyPath,
in DoCreatePkgStream() argument 688 int32_t ret = SetSignVerifyKeyName(keyPath);
in DoCreatePkgStream() 698 ret = VerifyBinFile(packagePath, keyPath, version, digest);
in DoCreatePkgStream() 706 ret = pkgManager->LoadPackage(packagePath, keyPath, components);
in DoCreatePkgStream() 968 int32_t PkgManagerImpl::VerifyAccPackage(const std::string &packagePath, const std::string &keyPath)
in DoCreatePkgStream() argument 980 ret = verifyUtil.VerifyAccPackageSign(pkgStream, keyPath);
in DoCreatePkgStream() 1067 VerifyBinFile(const std::string &packagePath, const std::string &keyPath, const std::string &version, const PkgBuffer &digest) DoCreatePkgStream() argument [all...] |
/base/update/updateservice/services/engine/include/ |
H A D | update_service_local_updater.h | 36 int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,
|
H A D | update_service.h | 89 int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,
|
/base/update/updater/services/include/package/ |
H A D | pkg_manager.h | 241 * @param keyPath file name of the key used for verification
247 virtual int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath,
258 virtual int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath,
261 virtual int32_t VerifyAccPackage(const std::string &packagePath, const std::string &keyPath) = 0;
267 virtual int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
353 virtual int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
|
/base/notification/distributed_notification_service/services/ans/src/common/ |
H A D | aes_gcm_helper.cpp | 95 std::filesystem::path keyPath(keyDir); in GenerateKey() 96 if (std::filesystem::exists(keyPath)) { in GenerateKey() 113 if (!std::filesystem::exists(keyPath.parent_path())) { in GenerateKey()
|
/base/update/updater/services/updater_binary/ |
H A D | update_processor.h | 42 int ProcessUpdater(bool retry, int pipeFd, const std::string &packagePath, const std::string &keyPath);
|
H A D | update_processor.cpp | 470 int ProcessUpdater(bool retry, int pipeFd, const std::string &packagePath, const std::string &keyPath) in ProcessUpdater() argument 496 ret = pkgManager->LoadPackage(packagePath, keyPath, components); in ProcessUpdater()
|
/base/update/updateservice/interfaces/inner_api/engine/include/ |
H A D | update_service_kits_impl.h | 86 int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,
|
H A D | update_service_proxy.h | 78 int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,
|
/base/update/updateservice/interfaces/inner_api/include/ |
H A D | update_service_kits.h | 104 virtual int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath,
|
/base/update/updateservice/interfaces/inner_api/engine/src/ |
H A D | update_service_kits_impl.cpp | 255 int32_t UpdateServiceKitsImpl::VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, in VerifyUpgradePackage() argument 261 int32_t ret = updateService->VerifyUpgradePackage(packagePath, keyPath, businessError); in VerifyUpgradePackage()
|