summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorSteveice10 <1269164+Steveice10@users.noreply.github.com>2023-09-05 21:09:42 +0200
committerGitHub <noreply@github.com>2023-09-05 21:09:42 +0200
commit0a51fe78544daafceadbd5418e406bf11e703851 (patch)
tree83c7ae92e1c46ec70ec8ab79420362e5e4b0212d /src/core/hle/service
parentMerge pull request #11427 from zhaobot/tx-update-20230901020727 (diff)
downloadyuzu-0a51fe78544daafceadbd5418e406bf11e703851.tar
yuzu-0a51fe78544daafceadbd5418e406bf11e703851.tar.gz
yuzu-0a51fe78544daafceadbd5418e406bf11e703851.tar.bz2
yuzu-0a51fe78544daafceadbd5418e406bf11e703851.tar.lz
yuzu-0a51fe78544daafceadbd5418e406bf11e703851.tar.xz
yuzu-0a51fe78544daafceadbd5418e406bf11e703851.tar.zst
yuzu-0a51fe78544daafceadbd5418e406bf11e703851.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/es/es.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp
index 446f46b3c..9eaae4c4b 100644
--- a/src/core/hle/service/es/es.cpp
+++ b/src/core/hle/service/es/es.cpp
@@ -122,20 +122,18 @@ private:
}
void ImportTicket(HLERequestContext& ctx) {
- const auto ticket = ctx.ReadBuffer();
+ const auto raw_ticket = ctx.ReadBuffer();
[[maybe_unused]] const auto cert = ctx.ReadBuffer(1);
- if (ticket.size() < sizeof(Core::Crypto::Ticket)) {
+ if (raw_ticket.size() < sizeof(Core::Crypto::Ticket)) {
LOG_ERROR(Service_ETicket, "The input buffer is not large enough!");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ERROR_INVALID_ARGUMENT);
return;
}
- Core::Crypto::Ticket raw{};
- std::memcpy(&raw, ticket.data(), sizeof(Core::Crypto::Ticket));
-
- if (!keys.AddTicketPersonalized(raw)) {
+ Core::Crypto::Ticket ticket = Core::Crypto::Ticket::Read(raw_ticket);
+ if (!keys.AddTicket(ticket)) {
LOG_ERROR(Service_ETicket, "The ticket could not be imported!");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ERROR_INVALID_ARGUMENT);