How can I tell if a .cat file is Attestation signed or WHQL signed?
I know from documentation I can use Get-AuthenticodeSignature to get information about the Authenticode signature for a file. I also know it can be Attestation signed or WHQL signed, but I'm not sure how to tell which it is. I tried asking ChatGPT this question, and after some prompting it responded with this:
"Look for the Issuer and Subject fields in the certificate information. WHQL-signed catalog files often have an issuer related to Microsoft Windows Hardware Compatibility Publisher or a similar trusted authority."
# Get information about the catalog file's digital signature
$catalogSignature = Get-AuthenticodeSignature -FilePath $catalogFilePath
# Check if the catalog signature indicates WHQL or Attestation signing
if ($catalogSignature.Issuer -like "*Windows Hardware Compatibility Publisher*") {
Write-Host "The catalog file is WHQL-signed."
} else {
Write-Host "The catalog file is Attestation-signed."
}
But that only accounts for one possibility, and I understand there are a number of other possible issuers. Is there a better way to tell without having to list out all possible issuers?