crypto: Streamline ticket loading.
Do not parse title key when already known, and re-use code where possible. Offers a significant speed-up to game list population.
This commit is contained in:
@@ -133,14 +133,7 @@ private:
|
||||
}
|
||||
|
||||
Core::Crypto::Ticket ticket = Core::Crypto::Ticket::Read(raw_ticket);
|
||||
if (!ticket.IsValid()) {
|
||||
LOG_ERROR(Service_ETicket, "The ticket is invalid!");
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ERROR_INVALID_ARGUMENT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!keys.AddTicketPersonalized(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);
|
||||
|
||||
Reference in New Issue
Block a user