summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/es
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-04-16 15:12:04 +0200
committerZach Hilman <zachhilman@gmail.com>2019-07-08 03:38:33 +0200
commitf8718ae779bbdc6a3f514b5ce141515baa97e14f (patch)
tree4a7712329982e2cb512412cbb4a17fa52a53f780 /src/core/hle/service/es
parentes: Implement ETicket GetPersonalizedTicketData (17) (diff)
downloadyuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.tar
yuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.tar.gz
yuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.tar.bz2
yuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.tar.lz
yuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.tar.xz
yuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.tar.zst
yuzu-f8718ae779bbdc6a3f514b5ce141515baa97e14f.zip
Diffstat (limited to 'src/core/hle/service/es')
-rw-r--r--src/core/hle/service/es/es.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp
index d17fb778c..7e01f88b9 100644
--- a/src/core/hle/service/es/es.cpp
+++ b/src/core/hle/service/es/es.cpp
@@ -75,15 +75,15 @@ private:
const auto ticket = ctx.ReadBuffer();
const auto cert = ctx.ReadBuffer(1);
- if (ticket.size() < sizeof(Core::Crypto::TicketRaw)) {
+ if (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::TicketRaw raw;
- std::memcpy(raw.data(), ticket.data(), sizeof(Core::Crypto::TicketRaw));
+ Core::Crypto::Ticket raw{};
+ std::memcpy(&raw, ticket.data(), sizeof(Core::Crypto::Ticket));
if (!keys.AddTicketPersonalized(raw)) {
LOG_ERROR(Service_ETicket, "The ticket could not be imported!");
@@ -203,7 +203,7 @@ private:
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
- rb.Push<u64>(ticket.size());
+ rb.Push<u64>(ticket.GetSize());
}
void GetPersonalizedTicketSize(Kernel::HLERequestContext& ctx) {
@@ -219,7 +219,7 @@ private:
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
- rb.Push<u64>(ticket.size());
+ rb.Push<u64>(ticket.GetSize());
}
void GetCommonTicketData(Kernel::HLERequestContext& ctx) {
@@ -233,8 +233,8 @@ private:
const auto ticket = keys.GetCommonTickets().at(rights_id);
- const auto write_size = std::min(ticket.size(), ctx.GetWriteBufferSize());
- ctx.WriteBuffer(ticket.data(), write_size);
+ const auto write_size = std::min(ticket.GetSize(), ctx.GetWriteBufferSize());
+ ctx.WriteBuffer(&ticket, write_size);
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
@@ -252,8 +252,8 @@ private:
const auto ticket = keys.GetPersonalizedTickets().at(rights_id);
- const auto write_size = std::min(ticket.size(), ctx.GetWriteBufferSize());
- ctx.WriteBuffer(ticket.data(), write_size);
+ const auto write_size = std::min(ticket.GetSize(), ctx.GetWriteBufferSize());
+ ctx.WriteBuffer(&ticket, write_size);
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);