mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +00:00
fs: correct error result in AesCtrStorage
This commit is contained in:
parent
0e9974e7b3
commit
b2e86f5a1b
2 changed files with 3 additions and 2 deletions
|
@ -64,7 +64,7 @@ namespace ams::fssystem {
|
|||
|
||||
/* Decrypt, ensure we decrypt correctly. */
|
||||
auto dec_size = crypto::DecryptAes128Ctr(buffer, size, this->key, KeySize, ctr, IvSize, buffer, size);
|
||||
AMS_ABORT_UNLESS(size == dec_size);
|
||||
R_UNLESS(size == dec_size, fs::ResultUnexpectedInAesCtrStorageA());
|
||||
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ namespace ams::fssystem {
|
|||
ScopedThreadPriorityChanger cp(+1, ScopedThreadPriorityChanger::Mode::Relative);
|
||||
|
||||
auto enc_size = crypto::EncryptAes128Ctr(write_buf, write_size, this->key, KeySize, ctr, IvSize, reinterpret_cast<const char *>(buffer) + cur_offset, write_size);
|
||||
AMS_ABORT_UNLESS(enc_size == write_size);
|
||||
R_UNLESS(enc_size == write_size, fs::ResultUnexpectedInAesCtrStorageA());
|
||||
}
|
||||
|
||||
/* Write the encrypted data. */
|
||||
|
|
|
@ -214,6 +214,7 @@ namespace ams::fs {
|
|||
R_DEFINE_ERROR_RESULT(GameCardLogoDataCorrupted, 4781);
|
||||
|
||||
R_DEFINE_ERROR_RANGE(Unexpected, 5000, 5999);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInAesCtrStorageA, 5315);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInFindFileSystemA, 5319);
|
||||
|
||||
R_DEFINE_ERROR_RANGE(PreconditionViolation, 6000, 6499);
|
||||
|
|
Loading…
Reference in a new issue