summaryrefslogtreecommitdiff
path: root/src/core/crypto/key_manager.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-09-14 16:47:25 -0400
committerGravatar Lioncash2020-09-14 16:49:59 -0400
commite0dd440b1ff9bf4578d7b69912dfe4283bfd4e6a (patch)
tree3ef2537360711465dc0b08a79aa22a4180aa4f49 /src/core/crypto/key_manager.cpp
parentMerge pull request #4651 from lioncash/kernel-global (diff)
downloadyuzu-e0dd440b1ff9bf4578d7b69912dfe4283bfd4e6a.tar.gz
yuzu-e0dd440b1ff9bf4578d7b69912dfe4283bfd4e6a.tar.xz
yuzu-e0dd440b1ff9bf4578d7b69912dfe4283bfd4e6a.zip
crypto/key_manager: Remove dependency on the global system accessor
We can supply the content provider as an argument instead of hardcoding a global accessor in the implementation.
Diffstat (limited to 'src/core/crypto/key_manager.cpp')
-rw-r--r--src/core/crypto/key_manager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp
index dc591c730..65d246050 100644
--- a/src/core/crypto/key_manager.cpp
+++ b/src/core/crypto/key_manager.cpp
@@ -23,7 +23,6 @@
23#include "common/hex_util.h" 23#include "common/hex_util.h"
24#include "common/logging/log.h" 24#include "common/logging/log.h"
25#include "common/string_util.h" 25#include "common/string_util.h"
26#include "core/core.h"
27#include "core/crypto/aes_util.h" 26#include "core/crypto/aes_util.h"
28#include "core/crypto/key_manager.h" 27#include "core/crypto/key_manager.h"
29#include "core/crypto/partition_data_manager.h" 28#include "core/crypto/partition_data_manager.h"
@@ -1022,10 +1021,10 @@ void KeyManager::DeriveBase() {
1022 } 1021 }
1023} 1022}
1024 1023
1025void KeyManager::DeriveETicket(PartitionDataManager& data) { 1024void KeyManager::DeriveETicket(PartitionDataManager& data,
1025 const FileSys::ContentProvider& provider) {
1026 // ETicket keys 1026 // ETicket keys
1027 const auto es = Core::System::GetInstance().GetContentProvider().GetEntry( 1027 const auto es = provider.GetEntry(0x0100000000000033, FileSys::ContentRecordType::Program);
1028 0x0100000000000033, FileSys::ContentRecordType::Program);
1029 1028
1030 if (es == nullptr) { 1029 if (es == nullptr) {
1031 return; 1030 return;