From cfadea2994424ad68d93cb0a2d0ef83e18c335fc Mon Sep 17 00:00:00 2001 From: jakcron Date: Sun, 22 Sep 2024 23:46:52 +0800 Subject: [PATCH 1/3] Fix bug where KeyAreaEncryptionKeys were not calcd --- src/KeyBag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KeyBag.cpp b/src/KeyBag.cpp index 11df8de..a3ae08d 100644 --- a/src/KeyBag.cpp +++ b/src/KeyBag.cpp @@ -421,7 +421,7 @@ void nstool::KeyBagInitializer::importBaseKeyFile(const tc::io::Path& keyfile_pa for (size_t keak_idx = 0; keak_idx < pie::hac::nca::kKeyAreaEncryptionKeyNum; keak_idx++) { - if (key_area_key_source[keak_idx].isSet() && nca_key_area_encryption_key[keak_idx].find(itr->first) != nca_key_area_encryption_key[keak_idx].end()) + if (key_area_key_source[keak_idx].isSet() && nca_key_area_encryption_key[keak_idx].find(itr->first) == nca_key_area_encryption_key[keak_idx].end()) { aes128_key_t nca_key_area_encryption_key_tmp; pie::hac::AesKeygen::generateKey(nca_key_area_encryption_key_tmp.data(), aes_kek_generation_source.get().data(), key_area_key_source[keak_idx].get().data(), aes_key_generation_source.get().data(), itr->second.data()); From cfb826ca6c165fbcd816fd7949df88ef3d72a948 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 14 Oct 2024 10:20:20 +0900 Subject: [PATCH 2/3] Update libtoolchain to v0.8.0 (fixes VS dup issue) --- deps/libtoolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/libtoolchain b/deps/libtoolchain index fa13eb8..578d170 160000 --- a/deps/libtoolchain +++ b/deps/libtoolchain @@ -1 +1 @@ -Subproject commit fa13eb8679ad8ff64f90485e96f7c60bd2c568bb +Subproject commit 578d170f5b294e4a9feb3cc2d504896e846f204e From f70b6dc458ac0c6a692ff29a1f545af5ac784e4b Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 14 Oct 2024 10:27:17 +0900 Subject: [PATCH 3/3] Bump version to 1.9.2 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 3f495f0..f9f7581 100644 --- a/src/version.h +++ b/src/version.h @@ -3,5 +3,5 @@ #define BIN_NAME "nstool" #define VER_MAJOR 1 #define VER_MINOR 9 -#define VER_PATCH 1 +#define VER_PATCH 2 #define AUTHORS "jakcron" \ No newline at end of file