Class: HsmSignManager
Extends
SigntoolBaseSignManager
Constructors
Constructor
new HsmSignManager(
packager):HsmSignManager
Parameters
packager
Returns
HsmSignManager
Overrides
SigntoolBaseSignManager.constructor
Properties
computedPublisherName
readonlycomputedPublisherName:Lazy<string[] |null>
Inherited from
SigntoolBaseSignManager.computedPublisherName
cscInfo
readonlycscInfo:MemoLazy<WindowsConfiguration,FileCodeSigningInfo|CertificateFromStoreInfo|null>
Inherited from
SigntoolBaseSignManager.cscInfo
lazyCertInfo
readonlylazyCertInfo:MemoLazy<MemoLazy<WindowsConfiguration,FileCodeSigningInfo|CertificateFromStoreInfo|null>,CertificateInfo|null>
Inherited from
SigntoolBaseSignManager.lazyCertInfo
packager
protectedreadonlypackager:WinPackager
Inherited from
SigntoolBaseSignManager.packager
platformSpecificBuildOptions
protectedreadonlyplatformSpecificBuildOptions:WindowsConfiguration
Inherited from
SigntoolBaseSignManager.platformSpecificBuildOptions
Methods
addCertificateArgs()
protectedaddCertificateArgs(args,options,vm,isWin,allowX509?):void
Parameters
args
string[]
options
vm
VmManager
isWin
boolean
allowX509?
boolean = false
Returns
void
Inherited from
SigntoolBaseSignManager.addCertificateArgs
addCommonSigningArgs()
protectedaddCommonSigningArgs(args,options,vm,isWin):void
Parameters
args
string[]
options
vm
VmManager
isWin
boolean
Returns
void
Inherited from
SigntoolBaseSignManager.addCommonSigningArgs
computeOsslsigncodeArgs()
protectedcomputeOsslsigncodeArgs(_options,_vm):string[]
Parameters
_options
_vm
VmManager
Returns
string[]
Overrides
SigntoolBaseSignManager.computeOsslsigncodeArgs
computePublisherName()
computePublisherName(
target,publisherName):Promise<string>
Parameters
target
publisherName
string | null
Returns
Promise<string>
Inherited from
SigntoolBaseSignManager.computePublisherName
computeSignToolArgs()
computeSignToolArgs(
options,isWin,vm?):string[]
Parameters
options
isWin
boolean
vm?
VmManager = ...
Returns
string[]
Inherited from
SigntoolBaseSignManager.computeSignToolArgs
computeWindowsSignArgs()
protectedcomputeWindowsSignArgs(options,vm):string[]
Parameters
options
vm
VmManager
Returns
string[]
Overrides
SigntoolBaseSignManager.computeWindowsSignArgs
doSign()
doSign(
configuration,packager):Promise<void>
Parameters
configuration
CustomWindowsSignTaskConfiguration
packager
Returns
Promise<void>
Inherited from
SigntoolBaseSignManager.doSign
getCertificateFromStoreInfo()
getCertificateFromStoreInfo(
options,vm):Promise<CertificateFromStoreInfo>
Parameters
options
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()
protectedhandleNullCscInfo(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()
protectedisLegacyToolset():boolean
Returns
boolean
Inherited from
SigntoolBaseSignManager.isLegacyToolset
signFile()
signFile(
options):Promise<boolean>
Parameters
options
Returns
Promise<boolean>
Inherited from
SigntoolBaseSignManager.signFile
validateExplicitPublisherName()
protectedvalidateExplicitPublisherName():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