Skip to main content

Function: matchPublisherName()

matchPublisherName(data, publisherNames): boolean

Returns true if any entry in publisherNames matches the subject of the signing certificate (in the format Windows reports it, X509Certificate2.Subject): an entry matches when it is a valid publisher name DN (isValidPublisherNameDn) and every attribute it specifies equals the subject's value for the same key (attribute order and subject attributes the entry does not specify are ignored). Any other entry never matches.

Throws a TypeError when the signature carries no signer certificate subject.

Parameters​

data​

AuthenticodeSignerCertificateData

publisherNames​

readonly string[]

Returns​

boolean