Skip to content

Commit

Permalink
Add cdhash, teamID, and signingID to bundle events (#1353)
Browse files Browse the repository at this point in the history
Fix #1352
  • Loading branch information
np5 committed May 20, 2024
1 parent ac1c9d8 commit d8928ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/santabundleservice/SNTBundleService.m
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ - (NSDictionary *)generateEventsFromBinaries:(NSArray *)fis

MOLCodesignChecker *cs = [fi codesignCheckerWithError:NULL];
se.signingChain = cs.certificates;
se.cdhash = cs.cdhash;
se.teamID = cs.teamID;
if (cs.signingID) {
if (cs.teamID) {
se.signingID = [NSString stringWithFormat:@"%@:%@", cs.teamID, cs.signingID];
} else if (cs.platformBinary) {
se.signingID = [NSString stringWithFormat:@"platform:%@", cs.signingID];
}
}

dispatch_sync(dispatch_get_main_queue(), ^{
relatedEvents[se.fileSHA256] = se;
Expand Down

0 comments on commit d8928ac

Please sign in to comment.