From 5495118b90836c5f03778e4e5ad589fe7bae2755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Falconnier?= Date: Fri, 17 May 2024 16:39:33 +0200 Subject: [PATCH] Prefix signingID with teamID or `platform` --- Source/santabundleservice/SNTBundleService.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/santabundleservice/SNTBundleService.m b/Source/santabundleservice/SNTBundleService.m index fe275b3f9..893d18836 100644 --- a/Source/santabundleservice/SNTBundleService.m +++ b/Source/santabundleservice/SNTBundleService.m @@ -226,9 +226,17 @@ - (NSDictionary *)generateEventsFromBinaries:(NSArray *)fis MOLCodesignChecker *cs = [fi codesignCheckerWithError:NULL]; se.signingChain = cs.certificates; - se.teamID = cs.teamID; - se.signingID = cs.signingID; 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;