Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 3 additions & 4 deletions src/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ async function verifySignApplication (opts: ValidatedSignOptions) {
// Verify with codesign
debugLog('Verifying application bundle with codesign...');

const strictVerify = opts.strictVerify !== undefined ? opts.strictVerify : true;
await execFileAsync(
'codesign',
['--verify', '--deep'].concat(
opts.strictVerify !== false && compareVersion(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan
strictVerify !== false && compareVersion(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan
? [
'--strict' +
(opts.strictVerify
? '=' + opts.strictVerify // Array should be converted to a comma separated string
: '')
(strictVerify !== true ? '=' + strictVerify : '')
]
: [],
['--verbose=2', opts.app]
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ export type OnlySignOptions = {
provisioningProfile?: string;
/**
* Flag to enable/disable the `--strict` flag when verifying the signed application bundle.
* Also supports string values to specify which strict restrictions to use, see codesign man page for supported values.
*
* @defaultValue `true`
*/
strictVerify?: boolean;
strictVerify?: boolean | string;
/**
* Type of certificate to use when signing a MAS app.
* @defaultValue `"distribution"`
Expand Down