My publish script looks like this:
const builder = require('electron-builder');
const Platform = builder.Platform;
builder.build({
targets: Platform.WINDOWS.createTarget(),
publish: true,
platform: 'win32',
config: {
appId: 'com.amdirent.opslab',
forceCodeSigning: true,
publish: [
{
provider: 's3',
bucket: 'whatever-bucket',
region: 'us-east-1'
}
],
win: {
certificateSubjectName: 'A Subject Name',
publisherName: 'My Org, Inc.'
}
}
})
.catch(console.error);
When I run it, I get Error: certificateSubjectName supported only on Windows
. Note that I'm on Mac, but the target is windows.
The relevant line is here: https://github.com/electron-userland/electron-builder/blob/master/packages/electron-builder/src/windowsCodeSign.ts#L87
Does this mean I cannot sign from mac? Because there's a command line command codesign
that does the signing, and a Mac _can_ sign for a Windows app. Does electron-builder just not support this?
https://github.com/electron-userland/electron-builder/issues/1299
So electron-builder doesn't support mac EV signing a windows app.
Could you please tell me how can we use this certificateSubjectName variable in our electron code and where? I want to sign my electron app, I am using windows to create a build.
Thanks.
+1 i am in same situation, do have EV codesigning cert on a smartcard, it is visible on my MAC Keychain, all seems to be normal but electron-builder cannot discover it. What exactly is "certificateSubjectName" ?
Most helpful comment
+1 i am in same situation, do have EV codesigning cert on a smartcard, it is visible on my MAC Keychain, all seems to be normal but electron-builder cannot discover it. What exactly is "certificateSubjectName" ?