mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 14:58:26 -04:00
[uefi] improve revoked UEFI bootloader reporting
* Remove duplicates from Microsoft's SKUSiPolicy.p7b * Also display the number of revoked from embedded * Also use Microsoft's official capitalization for SKUSiPolicy.p7b's target path
This commit is contained in:
parent
16570f8662
commit
52a5551749
6 changed files with 26 additions and 15 deletions
|
@ -888,8 +888,12 @@ BOOL ParseSKUSiPolicy(void)
|
|||
}
|
||||
// We are only interested in 'DENY' type with PE256 hashes
|
||||
if (FileRuleHeader->Type == CI_DENY && FileRuleData->HashLength == PE256_HASHSIZE) {
|
||||
memcpy(&pe256ssp[pe256ssp_size * PE256_HASHSIZE], FileRuleData->Hash, PE256_HASHSIZE);
|
||||
pe256ssp_size++;
|
||||
// Microsoft has the bad habit of duplicating entries - only add a hash if it's different from previous entry
|
||||
if ((pe256ssp_size == 0) ||
|
||||
(memcmp(&pe256ssp[(pe256ssp_size - 1) * PE256_HASHSIZE], FileRuleData->Hash, PE256_HASHSIZE) != 0)) {
|
||||
memcpy(&pe256ssp[pe256ssp_size * PE256_HASHSIZE], FileRuleData->Hash, PE256_HASHSIZE);
|
||||
pe256ssp_size++;
|
||||
}
|
||||
}
|
||||
pbRule = &pbRule[sizeof(CIFileRuleData) + ((FileRuleData->HashLength + sizeof(DWORD) - 1) / sizeof(DWORD)) * sizeof(DWORD)];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue