Skip to content

Commit

Permalink
log error if signing cscInfo cannot be identified during signtool exe…
Browse files Browse the repository at this point in the history
…cution. Return false for quick exit with logging
  • Loading branch information
mmaietta committed Sep 23, 2024
1 parent 7d5940a commit 6fb765c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface FileCodeSigningInfo {
}

export interface WindowsSignTaskConfiguration extends WindowsSignToolOptions {
readonly cscInfo: FileCodeSigningInfo | CertificateFromStoreInfo | null
readonly cscInfo: FileCodeSigningInfo | CertificateFromStoreInfo

// set if output path differs from input (e.g. osslsigncode cannot sign file in-place)
resultOutputPath?: string
Expand Down Expand Up @@ -194,6 +194,9 @@ export class WindowsSignToolManager {
}
}
log.info(logInfo, "signing")
} else {
log.error(null, "no signing info identified, signing is skipped. Was this intentional? You can test further with `forceCodeSigning: true` in `win` configuration")
return false
}

const name = this.packager.appInfo.productName
Expand Down Expand Up @@ -412,7 +415,7 @@ export class WindowsSignToolManager {
let args: Array<string>
let env = process.env
let vm: VmManager
const vmRequired = configuration.path.endsWith(".appx") || !("file" in configuration.cscInfo!) /* certificateSubjectName and other such options */
const vmRequired = configuration.path.endsWith(".appx") || !("file" in configuration.cscInfo) /* certificateSubjectName and other such options */
const isWin = process.platform === "win32" || vmRequired
const toolInfo = await this.getToolPath(isWin)
const tool = toolInfo.path
Expand Down

0 comments on commit 6fb765c

Please sign in to comment.