mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 07:05:40 +12:00
Sanity check: Assert .code is encrypted before setting normal key
This commit is contained in:
parent
096d0a89ee
commit
e608436315
1 changed files with 2 additions and 2 deletions
|
@ -207,8 +207,8 @@ bool NCCH::loadFromHeader(Crypto::AESEngine &aesEngine, IOFile& file, const FSIn
|
||||||
// All files in ExeFS use the same IV, though .code uses the secondary key for decryption
|
// All files in ExeFS use the same IV, though .code uses the secondary key for decryption
|
||||||
// whereas .icon/.banner use the primary key.
|
// whereas .icon/.banner use the primary key.
|
||||||
FSInfo info = exeFS;
|
FSInfo info = exeFS;
|
||||||
if (secondaryKey.has_value() && info.encryptionInfo.has_value()) {
|
if (encrypted && secondaryKey.has_value() && info.encryptionInfo.has_value()) {
|
||||||
info.encryptionInfo->normalKey = secondaryKey.value();
|
info.encryptionInfo->normalKey = *secondaryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compressCode) {
|
if (compressCode) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue