Skip to content

Commit

Permalink
fix: Added support for overriding ‘strict-verify’ electron-osx-sign p…
Browse files Browse the repository at this point in the history
…roperty. (#5261)

* Added support for overriding ‘strict-verify’ electron-osx-sign property.

* Fix schema bugs (and run the electron builder schema fixer).

* Fix option so that electron-osx-sign behaves properly.

Close #1480
  • Loading branch information
bedney authored Sep 17, 2020
1 parent ea9281b commit c554f25
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2284,6 +2284,24 @@
"string"
]
},
"strictVerify": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": [
"string",
"boolean"
]
}
],
"default": true,
"description": "Whether to let electron-osx-sign verify the contents or not."
},
"target": {
"anyOf": [
{
Expand Down Expand Up @@ -2831,6 +2849,24 @@
"string"
]
},
"strictVerify": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": [
"string",
"boolean"
]
}
],
"default": true,
"description": "Whether to let electron-osx-sign verify the contents or not."
},
"target": {
"anyOf": [
{
Expand Down
2 changes: 2 additions & 0 deletions packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
// https://github.com/electron-userland/electron-osx-sign/issues/196
// will fail on 10.14.5+ because a signed but unnotarized app is also rejected.
"gatekeeper-assess": options.gatekeeperAssess === true,
// https://github.com/electron-userland/electron-builder/issues/1480
"strict-verify": options.strictVerify,
hardenedRuntime: isMas ? masOptions && masOptions.hardenedRuntime === true : options.hardenedRuntime !== false,
}

Expand Down
6 changes: 6 additions & 0 deletions packages/app-builder-lib/src/options/macOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
* @default false
*/
readonly gatekeeperAssess?: boolean

/**
* Whether to let electron-osx-sign verify the contents or not.
* @default true
*/
readonly strictVerify?: Array<string> | string | boolean
}

export interface DmgOptions extends TargetSpecificOptions {
Expand Down

0 comments on commit c554f25

Please sign in to comment.