From f786802b9b699548d0160cf52dff58018566fd70 Mon Sep 17 00:00:00 2001 From: swurl Date: Thu, 8 May 2025 22:16:07 +0000 Subject: User Data Migration from Citron, Sudachi, and Yuzu (#91) Includes citron, sudachi, yuzu currently broken, because the eden dir is always made early? Signed-off-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/91 Co-authored-by: swurl Co-committed-by: swurl --- src/core/crypto/key_manager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core/crypto/key_manager.cpp') diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index 43a3c5ffd6..74b1ca04b1 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -372,7 +372,7 @@ Key128 DeriveKeyblobMACKey(const Key128& keyblob_key, const Key128& mac_source) std::optional DeriveSDSeed() { const auto system_save_43_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000043"; + Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir) / "system/save/8000000000000043"; const Common::FS::IOFile save_43{system_save_43_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -381,7 +381,7 @@ std::optional DeriveSDSeed() { } const auto sd_private_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "Nintendo/Contents/private"; + Common::FS::GetEdenPath(Common::FS::EdenPath::SDMCDir) / "Nintendo/Contents/private"; const Common::FS::IOFile sd_private{sd_private_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -640,7 +640,7 @@ KeyManager::KeyManager() { void KeyManager::ReloadKeys() { // Initialize keys - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::KeysDir); if (!Common::FS::CreateDir(yuzu_keys_dir)) { LOG_ERROR(Core, "Failed to create the keys directory."); @@ -847,7 +847,7 @@ Key256 KeyManager::GetBISKey(u8 partition_id) const { template void KeyManager::WriteKeyToFile(KeyCategory category, std::string_view keyname, const std::array& key) { - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::KeysDir); std::string filename = "title.keys_autogenerated"; @@ -947,7 +947,7 @@ void KeyManager::SetKey(S256KeyType id, Key256 key, u64 field1, u64 field2) { } bool KeyManager::KeyFileExists(bool title) { - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::KeysDir); if (title) { return Common::FS::Exists(yuzu_keys_dir / "title.keys"); @@ -1197,7 +1197,7 @@ void KeyManager::PopulateTickets() { std::vector tickets; const auto system_save_e1_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e1"; + Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir) / "system/save/80000000000000e1"; if (Common::FS::Exists(system_save_e1_path)) { const Common::FS::IOFile save_e1{system_save_e1_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -1206,7 +1206,7 @@ void KeyManager::PopulateTickets() { } const auto system_save_e2_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e2"; + Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir) / "system/save/80000000000000e2"; if (Common::FS::Exists(system_save_e2_path)) { const Common::FS::IOFile save_e2{system_save_e2_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; -- cgit v1.2.3