summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/content_archive.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-16 18:12:50 +0200
committerLioncash <mathew1800@gmail.com>2018-10-16 19:22:28 +0200
commitd6604fa765890fd7583440362d4e0bdbb82a8215 (patch)
treedeac7c8328e2aca3491f878570919cc8f0ac971c /src/core/file_sys/content_archive.h
parentcontent_archive: Pass and take NCASectionHeader instance by reference (diff)
downloadyuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.tar
yuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.tar.gz
yuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.tar.bz2
yuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.tar.lz
yuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.tar.xz
yuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.tar.zst
yuzu-d6604fa765890fd7583440362d4e0bdbb82a8215.zip
Diffstat (limited to 'src/core/file_sys/content_archive.h')
-rw-r--r--src/core/file_sys/content_archive.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h
index d02ea4f4b..e5d3d3c6a 100644
--- a/src/core/file_sys/content_archive.h
+++ b/src/core/file_sys/content_archive.h
@@ -106,6 +106,15 @@ protected:
bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override;
private:
+ bool CheckSupportedNCA(const NCAHeader& header);
+ bool HandlePotentialHeaderDecryption();
+
+ std::vector<NCASectionHeader> ReadSectionHeaders() const;
+ bool ReadSections(const std::vector<NCASectionHeader>& sections, u64 bktr_base_ivfc_offset);
+ bool ReadRomFSSection(const NCASectionHeader& section, const NCASectionTableEntry& entry,
+ u64 bktr_base_ivfc_offset);
+ bool ReadPFS0Section(const NCASectionHeader& section, const NCASectionTableEntry& entry);
+
u8 GetCryptoRevision() const;
boost::optional<Core::Crypto::Key128> GetKeyAreaKey(NCASectionCryptoType type) const;
boost::optional<Core::Crypto::Key128> GetTitlekey();
@@ -118,15 +127,15 @@ private:
VirtualDir exefs = nullptr;
VirtualFile file;
VirtualFile bktr_base_romfs;
- u64 ivfc_offset;
+ u64 ivfc_offset = 0;
NCAHeader header{};
bool has_rights_id{};
Loader::ResultStatus status{};
- bool encrypted;
- bool is_update;
+ bool encrypted = false;
+ bool is_update = false;
Core::Crypto::KeyManager keys;
};