From 1a575e947a2f9c53421bcb12cbf80a7c0ea30702 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 29 Feb 2020 15:58:45 +0800 Subject: [PATCH 1/2] Fix bug where mNcaKeyAreaEncryptionKeyHw wasn't initialised properly. --- src/KeyConfiguration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KeyConfiguration.cpp b/src/KeyConfiguration.cpp index 5053fab..1698eab 100644 --- a/src/KeyConfiguration.cpp +++ b/src/KeyConfiguration.cpp @@ -210,7 +210,7 @@ void KeyConfiguration::clearGeneralKeyConfiguration() for (size_t j = 0; j < kNcaKeakNum; j++) { mNcaKeyAreaEncryptionKey[j][i] = kNullAesKey; - mNcaKeyAreaEncryptionKey[j][i] = kNullAesKey; + mNcaKeyAreaEncryptionKeyHw[j][i] = kNullAesKey; } } } From 6a2667a37bcd58992325fea87b65c3b09cc62c9e Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 29 Feb 2020 15:59:05 +0800 Subject: [PATCH 2/2] [META] Now displays ACID keygeneration --- src/MetaProcess.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MetaProcess.cpp b/src/MetaProcess.cpp index 2594923..5e9b0ae 100644 --- a/src/MetaProcess.cpp +++ b/src/MetaProcess.cpp @@ -296,6 +296,7 @@ void MetaProcess::validateAciFromAcid(const nn::hac::AccessControlInfo& aci, con void MetaProcess::displayMetaHeader(const nn::hac::Meta& hdr) { std::cout << "[Meta Header]" << std::endl; + std::cout << " ACID KeyGeneration: " << std::dec << hdr.getAcidKeyGeneration() << std::endl; std::cout << " Process Architecture Params:" << std::endl; std::cout << " Ins. Type: " << nn::hac::MetaUtil::getInstructionTypeAsString(hdr.getInstructionType()) << std::endl; std::cout << " Addr Space: " << nn::hac::MetaUtil::getProcAddressSpaceTypeAsString(hdr.getProcAddressSpaceType()) << std::endl;