Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 733 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 733 Bytes

Authenticode for Node.JS

Installation

# with npm
npm install authenticode

# with yarn
yarn add authenticode

What is this about

Authenticode is Microsoft’s code-signing mechanism which allows identifying the publisher of executables (binaries or Powershell scripts).

This module wraps the Powershell cmdlet Get-Authenticode to return information about signatures of executable files to Node.JS.

import { getAuthenticode, SignatureStatus } from 'authenticode'

async function isSigned(path: string): Promise<boolean> {
  const { Status } = await getAuthenticode(path)
  return Status === SignatureStatus.Valid
}