summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/xts_archive.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-23 20:20:37 +0200
committerLioncash <mathew1800@gmail.com>2020-08-23 23:02:55 +0200
commit01d1b5cdaff6f05aa62794816547deab977256e5 (patch)
treef4212fd69ff589b9a5957e5f4215b0b5c8771db0 /src/core/file_sys/xts_archive.cpp
parentMerge pull request #4546 from lioncash/telemetry (diff)
downloadyuzu-01d1b5cdaff6f05aa62794816547deab977256e5.tar
yuzu-01d1b5cdaff6f05aa62794816547deab977256e5.tar.gz
yuzu-01d1b5cdaff6f05aa62794816547deab977256e5.tar.bz2
yuzu-01d1b5cdaff6f05aa62794816547deab977256e5.tar.lz
yuzu-01d1b5cdaff6f05aa62794816547deab977256e5.tar.xz
yuzu-01d1b5cdaff6f05aa62794816547deab977256e5.tar.zst
yuzu-01d1b5cdaff6f05aa62794816547deab977256e5.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/xts_archive.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp
index ccf5966d0..24c58e7ae 100644
--- a/src/core/file_sys/xts_archive.cpp
+++ b/src/core/file_sys/xts_archive.cpp
@@ -15,8 +15,9 @@
#include "common/hex_util.h"
#include "common/string_util.h"
#include "core/crypto/aes_util.h"
+#include "core/crypto/key_manager.h"
#include "core/crypto/xts_encryption_layer.h"
-#include "core/file_sys/partition_filesystem.h"
+#include "core/file_sys/content_archive.h"
#include "core/file_sys/vfs_offset.h"
#include "core/file_sys/xts_archive.h"
#include "core/loader/loader.h"
@@ -43,7 +44,9 @@ static bool CalculateHMAC256(Destination* out, const SourceKey* key, std::size_t
return true;
}
-NAX::NAX(VirtualFile file_) : header(std::make_unique<NAXHeader>()), file(std::move(file_)) {
+NAX::NAX(VirtualFile file_)
+ : header(std::make_unique<NAXHeader>()),
+ file(std::move(file_)), keys{Core::Crypto::KeyManager::Instance()} {
std::string path = Common::FS::SanitizePath(file->GetFullPath());
static const std::regex nax_path_regex("/registered/(000000[0-9A-F]{2})/([0-9A-F]{32})\\.nca",
std::regex_constants::ECMAScript |
@@ -60,7 +63,8 @@ NAX::NAX(VirtualFile file_) : header(std::make_unique<NAXHeader>()), file(std::m
}
NAX::NAX(VirtualFile file_, std::array<u8, 0x10> nca_id)
- : header(std::make_unique<NAXHeader>()), file(std::move(file_)) {
+ : header(std::make_unique<NAXHeader>()),
+ file(std::move(file_)), keys{Core::Crypto::KeyManager::Instance()} {
Core::Crypto::SHA256Hash hash{};
mbedtls_sha256_ret(nca_id.data(), nca_id.size(), hash.data(), 0);
status = Parse(fmt::format("/registered/000000{:02X}/{}.nca", hash[0],