Home
last modified time | relevance | path

Searched refs:keyPath (Results 1 - 25 of 25) sorted by relevance

/foundation/distributeddatamgr/kv_store/frameworks/native/kv_store/src/kvstore_impl_posix/
H A Dkv_store.c42 char* keyPath = (char *)malloc(MAX_KEY_PATH + 1); in GetResolvedPath() local
43 if (keyPath == NULL) { in GetResolvedPath()
46 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, "%s/%s/%s", dataPath, KVSTORE_PATH, key) < 0) { in GetResolvedPath()
47 free(keyPath); in GetResolvedPath()
50 if (realpath(keyPath, resolvedPath) != NULL) { in GetResolvedPath()
51 free(keyPath); in GetResolvedPath()
55 if (strncpy_s(resolvedPath, len, keyPath, strlen(keyPath)) == EOK) { in GetResolvedPath()
56 free(keyPath); in GetResolvedPath()
60 free(keyPath); in GetResolvedPath()
66 char* keyPath = (char *)malloc(PATH_MAX + 1); GetValueByFile() local
101 char* keyPath = (char *)malloc(PATH_MAX + 1); SetValueToFile() local
123 char* keyPath = (char *)malloc(MAX_KEY_PATH + 1); DeleteValueFromFile() local
195 char* keyPath = (char *)malloc(MAX_KEY_PATH + 1); NewItem() local
[all...]
/foundation/distributeddatamgr/relational_store/test/native/rdb/unittest/
H A Drdb_store_rekey_test.cpp130 auto keyPath = RDB_TEST_PATH + "key/" + name + ".pub_key"; in GetKeyFileDate() local
131 if (!OHOS::FileExists(keyPath)) { in GetKeyFileDate()
135 auto loaded = OHOS::LoadBufferFromFile(keyPath, content); in GetKeyFileDate()
151 auto keyPath = RDB_TEST_PATH + "key/" + name + ".pub_key"; in ChangeKeyFileDate() local
152 if (!OHOS::FileExists(keyPath)) { in ChangeKeyFileDate()
156 auto loaded = OHOS::LoadBufferFromFile(keyPath, content); in ChangeKeyFileDate()
165 auto saved = OHOS::SaveBufferToFile(keyPath, content); in ChangeKeyFileDate()
172 auto keyPath = RDB_TEST_PATH + "key/" + name + ".pub_key"; in SaveNewKey() local
174 if (!OHOS::FileExists(keyPath)) { in SaveNewKey()
178 auto loaded = OHOS::LoadBufferFromFile(keyPath, conten in SaveNewKey()
251 std::string keyPath = encryptedDatabaseKeyDir + RemoveSuffix(encryptedDatabaseName) + ".pub_key"; HWTEST_F() local
313 std::string keyPath = encryptedDatabaseKeyDir + RemoveSuffix(encryptedDatabaseName) + ".pub_key"; HWTEST_F() local
344 std::string keyPath = encryptedDatabaseKeyDir + RemoveSuffix(encryptedDatabaseName) + ".pub_key"; HWTEST_F() local
382 std::string keyPath = encryptedDatabaseKeyDir + RemoveSuffix(encryptedDatabaseName) + ".pub_key"; HWTEST_F() local
418 std::string keyPath = encryptedDatabaseKeyDir + RemoveSuffix(encryptedDatabaseName) + ".pub_key"; HWTEST_F() local
[all...]
H A Drdb_encrypt_decrypt_test.cpp195 std::string keyPath = RDB_TEST_PATH + "key/encrypted.pub_key"; in HWTEST_F() local
196 int ret = access(keyPath.c_str(), F_OK); in HWTEST_F()
201 ret = access(keyPath.c_str(), F_OK); in HWTEST_F()
236 std::string keyPath = RDB_TEST_PATH + "key/" + "encrypted.pub_key"; in HWTEST_F() local
238 bool isFileExists = OHOS::FileExists(keyPath); in HWTEST_F()
/foundation/filemanagement/storage_service/services/storage_daemon/mock/
H A Dbase_key_mock.cpp87 bool BaseKey::DecryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, in DecryptKeyBlob() argument
93 return IBaseKeyMoc::baseKeyMoc->DecryptKeyBlob(auth, keyPath, planKey, decryptedKey); in DecryptKeyBlob()
96 bool BaseKey::EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, in EncryptKeyBlob() argument
102 return IBaseKeyMoc::baseKeyMoc->EncryptKeyBlob(auth, keyPath, planKey, encryptedKey); in EncryptKeyBlob()
105 bool BaseKey::RenameKeyPath(const std::string &keyPath) in RenameKeyPath() argument
110 return IBaseKeyMoc::baseKeyMoc->RenameKeyPath(keyPath); in RenameKeyPath()
/foundation/filemanagement/storage_service/services/storage_daemon/include/crypto/
H A Dbase_key.h64 bool EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &encryptedKey);
65 bool DecryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &decryptedKey);
66 bool RenameKeyPath(const std::string &keyPath);
99 bool SaveAndCleanKeyBuff(const std::string &keyPath, KeyContext &keyCtx);
104 bool DoUpdateRestore(const UserAuth &auth, const std::string &keyPath);
117 bool InitKeyContext(const UserAuth &auth, const std::string &keyPath, KeyContext &keyCtx);
/foundation/filemanagement/storage_service/services/storage_daemon/crypto/src/
H A Dapp_clone_key_manager.cpp34 std::string keyPath = StringPrintf(NEED_RESTORE_PATH.c_str(), userId); in ActiveAppCloneUserKey() local
36 if (!std::filesystem::exists(keyPath, errCode)) { in ActiveAppCloneUserKey()
H A Dbase_key.cpp287 bool BaseKey::InitKeyContext(const UserAuth &auth, const std::string &keyPath, KeyContext &keyCtx) in StoreKey() argument
290 if (!LoadAndSaveShield(auth, keyPath + PATH_SHIELD, true, keyCtx)) { in StoreKey()
295 if (!GenerateAndSaveKeyBlob(keyCtx.secDiscard, keyPath + PATH_SECDISC, CRYPTO_KEY_SECDISC_SIZE)) { in StoreKey()
308 bool BaseKey::SaveAndCleanKeyBuff(const std::string &keyPath, KeyContext &keyCtx) in StoreKey() argument
316 if (!SaveKeyBlob(storeKey, keyPath + PATH_ENCRYPTED)) { in StoreKey()
320 const std::string NEED_UPDATE_PATH = keyPath + SUFFIX_NEED_UPDATE; in StoreKey()
521 bool BaseKey::DoRestoreKeyEx(const UserAuth &auth, const std::string &keyPath) in StoreKey() argument
524 if (!DoRestoreKey(auth, keyPath)) { in StoreKey()
534 if (!LoadKeyBlob(tempEnc, keyPath + PATH_ENCRYPTED)) { in StoreKey()
558 if (!DoRestoreKey(auth, keyPath)) { in StoreKey()
701 DoUpdateRestore(const UserAuth &auth, const std::string &keyPath) StoreKey() argument
919 EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &encryptedKey) StoreKey() argument
952 DecryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &decryptedKey) StoreKey() argument
987 RenameKeyPath(const std::string &keyPath) StoreKey() argument
[all...]
H A Dkey_manager.cpp1642 std::string keyPath; in UpdateCeEceSeceUserAuth() local
1650 keyPath = userEl1Key_[user]->GetDir(); in UpdateCeEceSeceUserAuth()
1656 keyPath = userEl2Key_[user]->GetDir(); in UpdateCeEceSeceUserAuth()
1666 int ret = LoadAndSetPolicy(keyPath.c_str(), item.path.c_str()); in UpdateCeEceSeceUserAuth()
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/test/
H A Dsecurity_manager_test.cpp79 auto keyPath = keyFiles.GetKeyFilePath(); in HWTEST_F() local
80 EXPECT_EQ(keyPath, "/data/service/el1/public/database/SecurityManagerTest/key/test1.key"); in HWTEST_F()
102 auto keyPath = keyFiles.GetKeyFilePath(); in HWTEST_F() local
103 EXPECT_EQ(keyPath, "/data/service/el1/public/database/SecurityManagerTest/key/test2.key"); in HWTEST_F()
H A Dstore_factory_test.cpp98 auto keyPath = path + "/key/" + name + ".key"; in GetDate() local
99 if (!OHOS::FileExists(keyPath)) { in GetDate()
104 auto loaded = OHOS::LoadBufferFromFile(keyPath, content); in GetDate()
118 auto keyPath = path + "/key/" + name + ".key"; in ChangeKeyDate() local
119 if (!OHOS::FileExists(keyPath)) { in ChangeKeyDate()
124 auto loaded = OHOS::LoadBufferFromFile(keyPath, content); in ChangeKeyDate()
133 auto saved = OHOS::SaveBufferToFile(keyPath, content); in ChangeKeyDate()
/foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt/src/
H A Dkey_control.c201 uint8_t KeyCtrlLoadVersion(const char *keyPath) in KeyCtrlLoadVersion() argument
203 if (!keyPath) { in KeyCtrlLoadVersion()
207 char pathLen = strlen(keyPath) + strlen(PATH_FSCRYPT_VER) + 1; in KeyCtrlLoadVersion()
214 if (strncat_s(path, pathLen - strlen(PATH_FSCRYPT_VER), keyPath, strlen(keyPath)) != EOK) { in KeyCtrlLoadVersion()
/foundation/distributeddatamgr/kv_store/frameworks/native/dbm_kv_store/src/kv_store_impl_hal/
H A Ddbm_kv_store.c347 char keyPath[MAX_KEY_PATH + 1] = {0}; in DeleteValueFromFile() local
348 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, ItemPathFormat(db), db->dirPath, key) < 0) { in DeleteValueFromFile()
351 int ret = UtilsFileDelete(keyPath); in DeleteValueFromFile()
361 char keyPath[MAX_KEY_PATH + 1] = {0}; in IsNewItem() local
362 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, ItemPathFormat(db), db->dirPath, key) < 0) { in IsNewItem()
365 int fd = UtilsFileOpen(keyPath, O_RDONLY_FS, 0); in IsNewItem()
757 char keyPath[MAX_KEY_PATH + 1] = {0}; in GetValueByFile() local
758 if (sprintf_s(keyPath, MAX_KEY_PATH + 1, ItemPathFormat(db), db->dirPath, keyGet) < 0) { in GetValueByFile()
763 if (UtilsFileStat(keyPath, &valueLen) < 0) { in GetValueByFile()
777 int fd = UtilsFileOpen(keyPath, O_RDONLY_F in GetValueByFile()
850 char* keyPath = (char *)malloc(MAX_KEY_PATH + 1); SetValueToFile() local
1064 char* keyPath = (char *)malloc(MAX_KEY_PATH + 1); FindDataItem() local
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src/
H A Dsecurity_manager.cpp114 auto keyPath = keyFiles.GetKeyFilePath(); in DelDBPassword() local
115 StoreUtil::Remove(keyPath); in DelDBPassword()
133 auto keyPath = path + KEY_DIR + SLASH + name + SUFFIX_KEY; in LoadKeyFromFile() local
134 if (!FileExists(keyPath)) { in LoadKeyFromFile()
140 auto loaded = LoadBufferFromFile(keyPath, content); in LoadKeyFromFile()
171 auto keyPath = path + KEY_DIR; in SaveKeyToFile() local
172 StoreUtil::InitPath(keyPath); in SaveKeyToFile()
179 auto keyFullPath = keyPath + SLASH + name + SUFFIX_KEY; in SaveKeyToFile()
H A Dbackup_manager.cpp53 auto keyPath = baseDir + KEY_PATH; in Init()
55 auto keyFiles = StoreUtil::GetFiles(keyPath); in Init()
/foundation/distributeddatamgr/kv_store/kvstoremock/frameworks/innerkitsimpl/kvdb/src/
H A Dsecurity_manager.cpp56 auto keyPath = path + "/key/" + name + ".key"; in DelDBPassword() local
57 StoreUtil::Remove(keyPath); in DelDBPassword()
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/include/
H A Drdb_security_manager.h108 bool SaveSecretKeyToDisk(const std::string &keyPath, RdbSecretKeyData &keyData);
110 bool LoadSecretKeyFromDisk(const std::string &keyPath, RdbSecretKeyData &keyData);
/foundation/communication/netstack/frameworks/cj/http/include/
H A Dffi_structs.h54 char* keyPath; member
/foundation/filemanagement/storage_service/services/storage_daemon/include/libfscrypt/
H A Dkey_control.h116 uint8_t KeyCtrlLoadVersion(const char *keyPath);
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/
H A Drdb_security_manager.cpp203 bool RdbSecurityManager::SaveSecretKeyToDisk(const std::string &keyPath, RdbSecretKeyData &keyData) in SaveSecretKeyToDisk() argument
205 LOG_INFO("begin keyPath:%{public}s.", SqliteUtils::Anonymous(keyPath).c_str()); in SaveSecretKeyToDisk()
218 ret = SaveBufferToFile(keyPath, secretKeyInChar); in SaveSecretKeyToDisk()
472 bool RdbSecurityManager::LoadSecretKeyFromDisk(const std::string &keyPath, RdbSecretKeyData &keyData) in LoadSecretKeyFromDisk() argument
474 LOG_DEBUG("begin keyPath:%{public}s.", SqliteUtils::Anonymous(keyPath).c_str()); in LoadSecretKeyFromDisk()
478 if (!LoadBufferFromFile(keyPath, content) || content.empty()) { in LoadSecretKeyFromDisk()
/foundation/filemanagement/storage_service/services/storage_daemon/include/mock/
H A Dbase_key_mock.h38 virtual bool RenameKeyPath(const std::string &keyPath) = 0;
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/include/
H A Dmedialibrary_meta_recovery.h86 EXPORT int32_t WriteMetaStatusToFile(const std::string &keyPath, const int32_t status);
/foundation/communication/netstack/frameworks/cj/http/src/
H A Dnet_http_request_context.cpp370 std::string keyPath{ops->clientCert->keyPath}; in ParseParams()
377 options.SetClientCert(certPath, certType, keyPath, keyPasswd); in ParseParams()
/foundation/communication/netstack/frameworks/js/napi/websocket/async_context/src/
H A Dconnect_context.cpp198 Secure::SecureChar keyPath = in ParseClientCert() local
202 SetClientCert(certPath, keyPath, keyPassword); in ParseClientCert()
/foundation/distributeddatamgr/relational_store/test/native/relational_store_test/unittest/
H A Drelational_store_test.cpp530 std::string keyPath = RDB_TEST_PATH + "key/encrypted.pub_key"; in HWTEST_F() local
531 int ret = access(keyPath.c_str(), F_OK); in HWTEST_F()
535 ret = access(keyPath.c_str(), F_OK); in HWTEST_F()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/
H A Dmedialibrary_meta_recovery.cpp997 int32_t MediaLibraryMetaRecovery::WriteMetaStatusToFile(const string &keyPath, const int32_t status) in WriteMetaStatusToFile() argument
1005 j[keyPath] = json::number_integer_t(status); in WriteMetaStatusToFile()

Completed in 20 milliseconds