diff --git a/README.md b/README.md index 1d2e052..d11d5a3 100644 --- a/README.md +++ b/README.md @@ -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`. + `strict-verify` - *Boolean|String|Array.* Flag to enable/disable `--strict` flag when verifying the signed application bundle. diff --git a/bin/electron-osx-sign-usage.txt b/bin/electron-osx-sign-usage.txt index 3bff28f..fb47501 100644 --- a/bin/electron-osx-sign-usage.txt +++ b/bin/electron-osx-sign-usage.txt @@ -70,6 +70,9 @@ DESCRIPTION --signature-flags=flags Code signature flags. Default to none. + --signature-size=size + Signature size. Default to none. + --strict-verify, --strict-verify=options, --no-strict-verify Flag to enable/disable ``--strict'' flag when verifying the signed application bundle. Each component should be separated in ``options'' with comma (``,''). diff --git a/bin/electron-osx-sign.js b/bin/electron-osx-sign.js index a8c9847..dfc6924 100755 --- a/bin/electron-osx-sign.js +++ b/bin/electron-osx-sign.js @@ -6,6 +6,9 @@ var args = require('minimist')(process.argv.slice(2), { 'string': [ 'signature-flags' ], + 'number': [ + 'signature-size' + ], 'boolean': [ 'help', 'pre-auto-entitlements', diff --git a/index.d.ts b/index.d.ts index 6999dc6..0263e6c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -16,6 +16,7 @@ declare module "electron-osx-sign" { 'pre-embed-provisioning-profile'?: boolean; 'provisioning-profile'?: string; 'requirements'?: string; + 'signature-size'?: number; 'type'?: string; version?: string; 'identity-validation'?: boolean; diff --git a/sign.js b/sign.js index c20c498..822d50d 100644 --- a/sign.js +++ b/sign.js @@ -158,6 +158,9 @@ function signApplicationAsync (opts) { } else { args.push('--timestamp') } + if (opts['signature-size'] && Number.isInteger(opts['signature-size'])) { + args.push('--signature-size', opts['signature-size']) + } let optionsArguments = []