yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #2936 from VPeruS/use-isallzeroarray

[crypto] Use IsAllZeroArray helper function
This commit is contained in:
bunnei 2019-10-04 15:44:35 -04:00 committed by GitHub
commit 7fbaf62bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -423,7 +423,7 @@ static std::optional<u64> FindTicketOffset(const std::array<u8, size>& data) {
std::optional<std::pair<Key128, Key128>> ParseTicket(const Ticket& ticket, std::optional<std::pair<Key128, Key128>> ParseTicket(const Ticket& ticket,
const RSAKeyPair<2048>& key) { const RSAKeyPair<2048>& key) {
const auto issuer = ticket.GetData().issuer; const auto issuer = ticket.GetData().issuer;
if (issuer == std::array<u8, 0x40>{}) if (IsAllZeroArray(issuer))
return {}; return {};
if (issuer[0] != 'R' || issuer[1] != 'o' || issuer[2] != 'o' || issuer[3] != 't') { if (issuer[0] != 'R' || issuer[1] != 'o' || issuer[2] != 'o' || issuer[3] != 't') {
LOG_INFO(Crypto, "Attempting to parse ticket with non-standard certificate authority."); LOG_INFO(Crypto, "Attempting to parse ticket with non-standard certificate authority.");