windows-runtime-signature.d.mts 1.0 KB

1234567891011121314151617181920212223242526
  1. /** Public-key verification result; no hardware authentication is performed. */
  2. export interface WindowsRuntimeSignature {
  3. status: string
  4. timestamped: boolean
  5. thumbprint: string | null
  6. }
  7. /**
  8. * Read Windows trust, timestamp and signer identity using the engine's bundled modules, without accessing the private key.
  9. * @param path File to inspect.
  10. * @returns Authenticode verification result.
  11. */
  12. export function inspectWindowsRuntimeSignature(path: string): Promise<WindowsRuntimeSignature>
  13. /**
  14. * Preserve a copied primary-runtime executable only after signature and exact-byte verification.
  15. * @param path Signing-hook target.
  16. * @param options Prepared and copied runtime roots with retained audit directory.
  17. * @returns True for a verified runtime copy; false for targets outside that directory.
  18. */
  19. export function preserveWindowsRuntimeSignature(path: string, options: {
  20. sourceRoot: string
  21. destinationRoot: string
  22. runDirectory: string
  23. inspect?: typeof inspectWindowsRuntimeSignature
  24. }): Promise<boolean>