Skip to content

Commit

Permalink
Fix #76 - Verify identity of mobileprovisioning if both provided
Browse files Browse the repository at this point in the history
  • Loading branch information
trufae committed Nov 23, 2018
1 parent 34f3a43 commit 99c920a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ module.exports = class Applesign {
throw new Error('Version passed to -O must be numeric');
}
}
if (opt.mobileprovision && !opt.identity) {
if (opt.mobileprovision && opt.identity) {
if (idprov(opt.mobileprovision) !== opt.identity) {
throw new Error('MobileProvisioningVersion doesn\'t match the given identity');
}
} else if (opt.mobileprovision && !opt.identity) {
opt.identity = idprov(opt.mobileprovision);
}
return {
Expand Down

0 comments on commit 99c920a

Please sign in to comment.