Skip to main content

Class: Pkcs11SignManager

Extends​

  • SigntoolBaseSignManager

Constructors​

Constructor​

new Pkcs11SignManager(packager): Pkcs11SignManager

Parameters​

packager​

WinPackager

Returns​

Pkcs11SignManager

Overrides​

SigntoolBaseSignManager.constructor

Properties​

computedPublisherName​

readonly computedPublisherName: Lazy<string[] | null>

Inherited from​

SigntoolBaseSignManager.computedPublisherName


cscInfo​

readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>

Overrides​

SigntoolBaseSignManager.cscInfo


lazyCertInfo​

readonly lazyCertInfo: MemoLazy<MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>, CertificateInfo | null>

Inherited from​

SigntoolBaseSignManager.lazyCertInfo


packager​

protected readonly packager: WinPackager

Inherited from​

SigntoolBaseSignManager.packager


platformSpecificBuildOptions​

protected readonly platformSpecificBuildOptions: WindowsConfiguration

Inherited from​

SigntoolBaseSignManager.platformSpecificBuildOptions

Methods​

addCertificateArgs()​

protected addCertificateArgs(args, options, vm, isWin, allowX509?): void

Parameters​

args​

string[]

options​

WindowsSignTaskConfiguration

vm​

VmManager

isWin​

boolean

allowX509?​

boolean = false

Returns​

void

Inherited from​

SigntoolBaseSignManager.addCertificateArgs


addCommonSigningArgs()​

protected addCommonSigningArgs(args, options, vm, isWin): void

Parameters​

args​

string[]

options​

WindowsSignTaskConfiguration

vm​

VmManager

isWin​

boolean

Returns​

void

Inherited from​

SigntoolBaseSignManager.addCommonSigningArgs


computeOsslsigncodeArgs()​

protected computeOsslsigncodeArgs(options, vm): string[]

Parameters​

options​

WindowsSignTaskConfiguration

vm​

VmManager

Returns​

string[]

Overrides​

SigntoolBaseSignManager.computeOsslsigncodeArgs


computePublisherName()​

computePublisherName(target, publisherName): Promise<string>

Parameters​

target​

Target

publisherName​

string | null

Returns​

Promise<string>

Inherited from​

SigntoolBaseSignManager.computePublisherName


computeSignToolArgs()​

computeSignToolArgs(options, isWin, vm?): string[]

Parameters​

options​

WindowsSignTaskConfiguration

isWin​

boolean

vm?​

VmManager = ...

Returns​

string[]

Inherited from​

SigntoolBaseSignManager.computeSignToolArgs


computeWindowsSignArgs()​

protected computeWindowsSignArgs(_options, _vm): string[]

Parameters​

_options​

WindowsSignTaskConfiguration

_vm​

VmManager

Returns​

string[]

Overrides​

SigntoolBaseSignManager.computeWindowsSignArgs


doSign()​

doSign(configuration, packager): Promise<void>

Parameters​

configuration​

CustomWindowsSignTaskConfiguration

packager​

WinPackager

Returns​

Promise<void>

Inherited from​

SigntoolBaseSignManager.doSign


getCertificateFromStoreInfo()​

getCertificateFromStoreInfo(options, vm): Promise<CertificateFromStoreInfo>

Parameters​

options​

WindowsConfiguration

vm​

VmManager

Returns​

Promise<CertificateFromStoreInfo>

Inherited from​

SigntoolBaseSignManager.getCertificateFromStoreInfo


getCertInfo()​

getCertInfo(file, password): Promise<CertificateInfo>

Parameters​

file​

string

password​

string

Returns​

Promise<CertificateInfo>

Inherited from​

SigntoolBaseSignManager.getCertInfo


getOutputPath()​

getOutputPath(inputPath, hash): string

Parameters​

inputPath​

string

hash​

string

Returns​

string

Inherited from​

SigntoolBaseSignManager.getOutputPath


getToolPath()​

getToolPath(isWin?): Promise<ToolInfo>

Parameters​

isWin?​

boolean = ...

Returns​

Promise<ToolInfo>

Inherited from​

SigntoolBaseSignManager.getToolPath


handleNullCscInfo()​

protected handleNullCscInfo(_customSign): boolean

Called when cscInfo is null. Returns true to skip signing, false to proceed, or throws. Override in subclasses with different null-cert behaviour (HSM throws, PKCS#11 proceeds).

Parameters​

_customSign​

string | CustomWindowsSign | null | undefined

Returns​

boolean

Overrides​

SigntoolBaseSignManager.handleNullCscInfo


initialize()​

initialize(): Promise<void>

Returns​

Promise<void>

Inherited from​

SigntoolBaseSignManager.initialize


isLegacyToolset()​

protected isLegacyToolset(): boolean

Returns​

boolean

Inherited from​

SigntoolBaseSignManager.isLegacyToolset


signFile()​

signFile(options): Promise<SignFileResult>

Parameters​

options​

WindowsSignOptions

Returns​

Promise<SignFileResult>

Inherited from​

SigntoolBaseSignManager.signFile


validateExplicitPublisherName()​

protected validateExplicitPublisherName(): Promise<void>

When publisherName is explicitly configured and the subject of the local code signing certificate is known, fail the build if none of the configured names match the certificate. This catches signing with the wrong certificate at build time — otherwise the mismatch only surfaces at update time, when electron-updater rejects every update signed with that certificate.

The check is intentionally skipped whenever the actual signing certificate's subject is not genuinely known: custom sign hooks, PKCS#11 without an extractable certificate file, x509 certificate files without a CN, or any error while reading certificate info. An explicit publisherName: null remains a pure opt-out (nothing to validate).

Returns​

Promise<void>

Inherited from​

SigntoolBaseSignManager.validateExplicitPublisherName