Skip to content
Snippets Groups Projects
Commit 44b0c19f authored by Zach Hilman's avatar Zach Hilman
Browse files

es: Implement ETicket GetPersonalizedTicketSize (15)

Returns the size of the buffer needed to hold the personal ticket associated with the rights ID.
parent 35b617b5
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
{12, &ETicket::ListPersonalizedTicket, "ListPersonalizedTicket"}, {12, &ETicket::ListPersonalizedTicket, "ListPersonalizedTicket"},
{13, nullptr, "ListMissingPersonalizedTicket"}, {13, nullptr, "ListMissingPersonalizedTicket"},
{14, &ETicket::GetCommonTicketSize, "GetCommonTicketSize"}, {14, &ETicket::GetCommonTicketSize, "GetCommonTicketSize"},
{15, nullptr, "GetPersonalizedTicketSize"}, {15, &ETicket::GetPersonalizedTicketSize, "GetPersonalizedTicketSize"},
{16, nullptr, "GetCommonTicketData"}, {16, nullptr, "GetCommonTicketData"},
{17, nullptr, "GetPersonalizedTicketData"}, {17, nullptr, "GetPersonalizedTicketData"},
{18, nullptr, "OwnTicket"}, {18, nullptr, "OwnTicket"},
...@@ -206,6 +206,22 @@ private: ...@@ -206,6 +206,22 @@ private:
rb.Push<u64>(ticket.size()); rb.Push<u64>(ticket.size());
} }
void GetPersonalizedTicketSize(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto rights_id = rp.PopRaw<u128>();
LOG_DEBUG(Service_ETicket, "called, rights_id={:016X}{:016X}", rights_id[1], rights_id[0]);
if (!CheckRightsId(ctx, rights_id))
return;
const auto ticket = keys.GetPersonalizedTickets().at(rights_id);
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push<u64>(ticket.size());
}
}; };
void InstallInterfaces(SM::ServiceManager& service_manager) { void InstallInterfaces(SM::ServiceManager& service_manager) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment