Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow skipping Gatekeper check #100

Merged
merged 6 commits into from
Nov 11, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ Default to system default keychain.
Regex or function that signals ignoring a file before signing.
Default to `undefined`.

`no-getekeeper-check` - *Boolean*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend naming it gatekeeper-assess where false disables Gatekeeper check.


Skip Gatekeeper check after signing the app. Useful for signing with self-signed certificates.
Gatekeeper check is enabled by default.

`platform` - *String*

Build platform of Electron.
Expand Down
3 changes: 3 additions & 0 deletions bin/electron-osx-sign-usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ DESCRIPTION
The keychain name.
Default to system default keychain.

--no-getekeeper-check
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like --pre-auto-entitlements, --no-pre-auto-entitlements, --gatekeeper-assess, --no-gatekeeper-assess may then enable/disable the feature.

Skip Gatekeeper check after signing the app. Useful for signing with self-signed certificates.

--platform=platform
Build platform of Electron.
Allowed values: ``darwin'', ``mas''.
Expand Down
6 changes: 4 additions & 2 deletions bin/electron-osx-sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ var args = require('minimist')(process.argv.slice(2), {
'boolean': [
'help',
'pre-auto-entitlements',
'pre-embed-provisioning-profile'
'pre-embed-provisioning-profile',
'no-gatekeeper-check'
],
'default': {
'pre-auto-entitlements': true,
'pre-embed-provisioning-profile': true
'pre-embed-provisioning-profile': true,
'no-gatekeeper-check': false
}
})
var usage = fs.readFileSync(path.join(__dirname, 'electron-osx-sign-usage.txt')).toString()
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface SignOptions extends BaseSignOptions {
binaries?: string[];
entitlements?: string;
'entitlements-inherit'?: string;
'no-gatekeeper-check'?: boolean;
}

export function sign(opts: SignOptions, callback: (error: Error) => void): void;
Expand Down
2 changes: 1 addition & 1 deletion sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function verifySignApplicationAsync (opts) {
})

// Additionally test Gatekeeper acceptance for darwin platform
if (opts.platform === 'darwin') {
if (opts.platform === 'darwin' && !opts['no-gatekeeper-check']) {
promise = promise.then(function () {
return new Promise(function (resolve, reject) {
debuglog('Verifying Gatekeeper acceptance for darwin platform...')
Expand Down