-
Notifications
You must be signed in to change notification settings - Fork 97
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
feat: adding signature-size option #208
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@netop Thanks for adding this feature! 🙌
I've left some comments... mostly nits 😸
README.md
Outdated
@@ -230,6 +230,9 @@ Restrict dyld loading. See doc about this [code signature flag](https://develope | |||
`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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably rather than having *Signature too large to embed*
, we can format it as "signature too large to embed"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sethlu Agreed & done 😄
sign.js
Outdated
@@ -158,6 +158,9 @@ function signApplicationAsync (opts) { | |||
} else { | |||
args.push('--timestamp') | |||
} | |||
if (opts['signature-size'] && Number.isInteger(opts['signature-size'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can debugwarn()
some information if a signature size is provided but isn't integer-typed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sethlu added debugwarn()
and a minimal check for positive value.
fix: debugwarn for bad signature-size value
@netop 🙇 Merged, thanks for working on this feature! |
Related to issue #207