Skip to content

Commit

Permalink
[doc] small spelling update
Browse files Browse the repository at this point in the history
[added]: debugwarn for bad signature-size value
  • Loading branch information
casi committed Oct 26, 2019
1 parent 1a53bc4 commit ba7b29d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ Default to `undefined`.

`restrict` - *Boolean*

**To be deprecated, see `signature-flags`.**
**To be deprecated, see `signature-flags`.**
Restrict dyld loading. See doc about this [code signature flag](https://developer.apple.com/documentation/security/seccodesignatureflags/kseccodesignaturerestrict?language=objc) for more details. Disabled by default.

`signature-flags` - *String*
Comma separated string or array for [code signature flag](https://developer.apple.com/documentation/security/seccodesignatureflags?language=objc). Default to `undefined`.

`signature-size` - *Number*
Provide a value to be passed to `codesign` along with the `--signature-size` flag, to work around the *Signature too large to embed* issue. A value of `12000` should do it - see the [FAQ](https://github.com/electron/electron-osx-sign/wiki/FAQ) for details. Default to `undefined`.
Provide a value to be passed to `codesign` along with the `--signature-size` flag, to work around the *signature too large to embed* issue. A value of `12000` should do it - see the [FAQ](https://github.com/electron/electron-osx-sign/wiki/FAQ) for details. Default to `undefined`.

`strict-verify` - *Boolean|String|Array.<String>*

Expand Down
8 changes: 6 additions & 2 deletions sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ function signApplicationAsync (opts) {
} else {
args.push('--timestamp')
}
if (opts['signature-size'] && Number.isInteger(opts['signature-size'])) {
args.push('--signature-size', opts['signature-size'])
if (opts['signature-size']) {
if(Number.isInteger(opts['signature-size']) && opts['signature-size'] > 0) {
args.push('--signature-size', opts['signature-size'])
} else {
debugwarn(`Invalid value provided for --signature-size (${opts['signature-size']}). Must be a positive integer.`)
}
}

let optionsArguments = []
Expand Down

0 comments on commit ba7b29d

Please sign in to comment.