aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <[email protected]>2018-08-16 17:02:50 -0400
committerZach Hilman <[email protected]>2018-08-23 11:52:44 -0400
commitb247e0cab0e01476d8bf56e989d34483782b7cae (patch)
tree409c86c7601040adc299b2a19ca9232793597447 /src
parent2164702cf7f878c84a1f148daca2416911e6e939 (diff)
downloadyuzu-android-b247e0cab0e01476d8bf56e989d34483782b7cae.tar.gz
yuzu-android-b247e0cab0e01476d8bf56e989d34483782b7cae.zip
loader: Add new NAX-specific errors and messages
Diffstat (limited to 'src')
-rw-r--r--src/core/loader/loader.cpp15
-rw-r--r--src/core/loader/loader.h13
2 files changed, 27 insertions, 1 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index fe5d71f68..c13fb49b8 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -87,7 +87,7 @@ std::string GetFileTypeString(FileType type) {
return "unknown";
}
-constexpr std::array<const char*, 36> RESULT_MESSAGES{
+constexpr std::array<const char*, 49> RESULT_MESSAGES{
"The operation completed successfully.",
"The loader requested to load is already loaded.",
"The operation is not implemented.",
@@ -124,6 +124,19 @@ constexpr std::array<const char*, 36> RESULT_MESSAGES{
"There was a general error loading the NRO into emulated memory.",
"There is no icon available.",
"There is no control data available.",
+ "The NAX file has a bad header.",
+ "The NAX file has incorrect size as determined by the header.",
+ "The HMAC to generated the NAX decryption keys failed.",
+ "The HMAC to validate the NAX decryption keys failed.",
+ "The NAX key derivation failed.",
+ "The NAX file cannot be interpreted as an NCA file.",
+ "The NAX file has an incorrect path.",
+ "The SD seed could not be found or derived.",
+ "The SD KEK Source could not be found.",
+ "The AES KEK Generation Source could not be found.",
+ "The AES Key Generation Source could not be found.",
+ "The SD Save Key Source could not be found.",
+ "The SD NCA Key Source could not be found.",
};
std::ostream& operator<<(std::ostream& os, ResultStatus status) {
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index d132fb4e8..885fee84c 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -94,6 +94,19 @@ enum class ResultStatus : u16 {
ErrorLoadingNRO,
ErrorNoIcon,
ErrorNoControl,
+ ErrorBadNAXHeader,
+ ErrorIncorrectNAXFileSize,
+ ErrorNAXKeyHMACFailed,
+ ErrorNAXValidationHMACFailed,
+ ErrorNAXKeyDerivationFailed,
+ ErrorNAXInconvertibleToNCA,
+ ErrorBadNAXFilePath,
+ ErrorMissingSDSeed,
+ ErrorMissingSDKEKSource,
+ ErrorMissingAESKEKGenerationSource,
+ ErrorMissingAESKeyGenerationSource,
+ ErrorMissingSDSaveKeySource,
+ ErrorMissingSDNCAKeySource,
};
std::ostream& operator<<(std::ostream& os, ResultStatus status);