Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async signDmg(artifactPath: string) {
if (!isSignAllowed(false)) {
return
}
const packager = this.packager
const qualifier = packager.platformSpecificBuildOptions.identity
// explicitly disabled if set to null
if (qualifier === null) {
// macPackager already somehow handle this situation, so, here just return
return
}
const keychainFile = (await packager.codeSigningInfo.value).keychainFile
const certificateType = "Developer ID Application"
let identity = await findIdentity(certificateType, qualifier, keychainFile)
if (identity == null) {
identity = await findIdentity("Mac Developer", qualifier, keychainFile)