summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-08-24 22:15:32 -0400
committerGravatar Zach Hilman2018-08-24 22:15:32 -0400
commit6314a799aa7e20789562d2e877949dfebb6194ce (patch)
treef5bd5cdd7e5804e7416abf75ab411c0be69b97e6
parentxci: Ignore NCA files with updates in secure (diff)
downloadyuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.gz
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.xz
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.zip
file_sys/crypto: Fix missing/unnecessary includes
-rw-r--r--src/core/crypto/key_manager.cpp5
-rw-r--r--src/core/crypto/key_manager.h1
-rw-r--r--src/core/crypto/xts_encryption_layer.cpp1
-rw-r--r--src/core/crypto/xts_encryption_layer.h1
-rw-r--r--src/core/file_sys/sdmc_factory.cpp2
-rw-r--r--src/core/file_sys/sdmc_factory.h1
-rw-r--r--src/core/file_sys/xts_archive.cpp2
-rw-r--r--src/core/file_sys/xts_archive.h1
-rw-r--r--src/core/loader/nax.cpp1
9 files changed, 10 insertions, 5 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp
index 0b14bf15c..0b6c07de8 100644
--- a/src/core/crypto/key_manager.cpp
+++ b/src/core/crypto/key_manager.cpp
@@ -133,7 +133,7 @@ KeyManager::KeyManager() {
133 } 133 }
134 134
135 AttemptLoadKeyFile(yuzu_keys_dir, hactool_keys_dir, "title.keys", true); 135 AttemptLoadKeyFile(yuzu_keys_dir, hactool_keys_dir, "title.keys", true);
136 AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, "title.keys_autogenerated", false); 136 AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, "title.keys_autogenerated", true);
137} 137}
138 138
139void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) { 139void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) {
@@ -223,8 +223,7 @@ void KeyManager::WriteKeyToFile(bool title_key, std::string_view keyname,
223 << "# If you are experiencing issues involving keys, it may help to delete this file\n"; 223 << "# If you are experiencing issues involving keys, it may help to delete this file\n";
224 } 224 }
225 225
226 file << std::endl 226 file << fmt::format("\n{} = {}", keyname, Common::HexArrayToString(key));
227 << fmt::format("{} = {}", keyname, Common::HexArrayToString(key)) << std::endl;
228 AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, filename, title_key); 227 AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, filename, title_key);
229} 228}
230 229
diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h
index 7a8728f76..7ca3e6cbc 100644
--- a/src/core/crypto/key_manager.h
+++ b/src/core/crypto/key_manager.h
@@ -6,6 +6,7 @@
6 6
7#include <array> 7#include <array>
8#include <string> 8#include <string>
9#include <string_view>
9#include <type_traits> 10#include <type_traits>
10#include <vector> 11#include <vector>
11#include <boost/container/flat_map.hpp> 12#include <boost/container/flat_map.hpp>
diff --git a/src/core/crypto/xts_encryption_layer.cpp b/src/core/crypto/xts_encryption_layer.cpp
index c6e5df1ce..c10832cfe 100644
--- a/src/core/crypto/xts_encryption_layer.cpp
+++ b/src/core/crypto/xts_encryption_layer.cpp
@@ -2,6 +2,7 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm>
5#include <cstring> 6#include <cstring>
6#include "common/assert.h" 7#include "common/assert.h"
7#include "core/crypto/xts_encryption_layer.h" 8#include "core/crypto/xts_encryption_layer.h"
diff --git a/src/core/crypto/xts_encryption_layer.h b/src/core/crypto/xts_encryption_layer.h
index 1e1acaf4a..7a1f1dc64 100644
--- a/src/core/crypto/xts_encryption_layer.h
+++ b/src/core/crypto/xts_encryption_layer.h
@@ -4,7 +4,6 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <vector>
8#include "core/crypto/aes_util.h" 7#include "core/crypto/aes_util.h"
9#include "core/crypto/encryption_layer.h" 8#include "core/crypto/encryption_layer.h"
10#include "core/crypto/key_manager.h" 9#include "core/crypto/key_manager.h"
diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp
index e4df5c4d0..d66a9c9a4 100644
--- a/src/core/file_sys/sdmc_factory.cpp
+++ b/src/core/file_sys/sdmc_factory.cpp
@@ -16,6 +16,8 @@ SDMCFactory::SDMCFactory(VirtualDir dir_)
16 return std::make_shared<NAX>(file, id)->GetDecrypted(); 16 return std::make_shared<NAX>(file, id)->GetDecrypted();
17 })) {} 17 })) {}
18 18
19SDMCFactory::~SDMCFactory() = default;
20
19ResultVal<VirtualDir> SDMCFactory::Open() { 21ResultVal<VirtualDir> SDMCFactory::Open() {
20 return MakeResult<VirtualDir>(dir); 22 return MakeResult<VirtualDir>(dir);
21} 23}
diff --git a/src/core/file_sys/sdmc_factory.h b/src/core/file_sys/sdmc_factory.h
index 4eac92621..ea12149de 100644
--- a/src/core/file_sys/sdmc_factory.h
+++ b/src/core/file_sys/sdmc_factory.h
@@ -16,6 +16,7 @@ class RegisteredCache;
16class SDMCFactory { 16class SDMCFactory {
17public: 17public:
18 explicit SDMCFactory(VirtualDir dir); 18 explicit SDMCFactory(VirtualDir dir);
19 ~SDMCFactory();
19 20
20 ResultVal<VirtualDir> Open(); 21 ResultVal<VirtualDir> Open();
21 std::shared_ptr<RegisteredCache> GetSDMCContents() const; 22 std::shared_ptr<RegisteredCache> GetSDMCContents() const;
diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp
index 605c1a283..552835738 100644
--- a/src/core/file_sys/xts_archive.cpp
+++ b/src/core/file_sys/xts_archive.cpp
@@ -2,7 +2,9 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm>
5#include <array> 6#include <array>
7#include <cstring>
6#include <regex> 8#include <regex>
7#include <string> 9#include <string>
8#include <mbedtls/md.h> 10#include <mbedtls/md.h>
diff --git a/src/core/file_sys/xts_archive.h b/src/core/file_sys/xts_archive.h
index 5249ad026..55d2154a6 100644
--- a/src/core/file_sys/xts_archive.h
+++ b/src/core/file_sys/xts_archive.h
@@ -8,6 +8,7 @@
8#include <vector> 8#include <vector>
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/swap.h" 10#include "common/swap.h"
11#include "core/crypto/key_manager.h"
11#include "core/file_sys/content_archive.h" 12#include "core/file_sys/content_archive.h"
12#include "core/file_sys/vfs.h" 13#include "core/file_sys/vfs.h"
13#include "core/loader/loader.h" 14#include "core/loader/loader.h"
diff --git a/src/core/loader/nax.cpp b/src/core/loader/nax.cpp
index b35fdc3f8..b46d81c02 100644
--- a/src/core/loader/nax.cpp
+++ b/src/core/loader/nax.cpp
@@ -3,7 +3,6 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "core/core.h"
7#include "core/file_sys/content_archive.h" 6#include "core/file_sys/content_archive.h"
8#include "core/file_sys/romfs.h" 7#include "core/file_sys/romfs.h"
9#include "core/file_sys/xts_archive.h" 8#include "core/file_sys/xts_archive.h"