You can use the following procedures to verify that a driver has a valid vendor-supplied Authenticode signature. These procedures are only supported by Microsoft® Windows® Server 2003 and later versions.
To determine if a driver has a valid Authenticode™ signature
If a driver has a valid Authenticode signature, Setup sets this flag in the Flags member of the driver node's SP_DRVINSTALL_PARAMS structure. (Also note that Setup sets the DNF_INF_IS_SIGNED flag if the driver has a WHQL digital signature, if it is a system-supplied driver, or if it has an Authenticode signature.)
To verify that an INF file has a valid Authenticode signature
If the INF file is not system-supplied and does not have a valid WHQL digital signature, but it does have a valid Authenticode signature, SetupVerifyInfFile returns FALSE and GetLastError returns one of the following error codes:
If the INF file has a valid Authenticode signature, SetupVerifyInfFile also returns the following information in the SP_INF_SIGNER_INFO output structure:
Note, however, that SetupVerifyInfFile does not return the version in the DigitalSignerVersion member.
To verify that a file has a valid Authenticode signature
SetupScanFileQueue sends an SPFILENOTIFY_QUEUESCAN_SIGNERINFO request to the caller's callback routine and passes a pointer to a FILEPATHS_SIGNERINFO structure. If a file is signed with a valid Authenticode signature, the function sets the error code to the appropriate ERROR_AUTHENTICODE_Xxx value before calling the callback for a file. The function also sets the following information in the FILEPATHS_SIGNERINFO structure:
Note, however, that the version is not set in the Version member.
SetupScanFileQueue sets the ERROR_AUTHENTICODE_Xxx error code in the same way as described earlier in this topic for SetupVerifyInfFile.