mirror of https://github.com/opa334/TrollStore.git
Info.plist fast path for apps already CT-signed
Apps declaring TSBundlePreSigned = YES in their Info.plist will not be signed by TrollStore
This commit is contained in:
parent
a685c9e07c
commit
5659a84c57
|
@ -346,6 +346,19 @@ BOOL signApp(NSString* appPath, NSError** error)
|
||||||
NSString* executablePath = [appPath stringByAppendingPathComponent:executable];
|
NSString* executablePath = [appPath stringByAppendingPathComponent:executable];
|
||||||
|
|
||||||
if(![[NSFileManager defaultManager] fileExistsAtPath:executablePath]) return NO;
|
if(![[NSFileManager defaultManager] fileExistsAtPath:executablePath]) return NO;
|
||||||
|
|
||||||
|
NSObject *tsBundleIsPreSigned = appInfoDict[@"TSBundlePreSigned"];
|
||||||
|
if([tsBundleIsPreSigned isKindOfClass:[NSNumber class]])
|
||||||
|
{
|
||||||
|
|
||||||
|
// if TSBundlePreSigned = YES, this bundle has been externally signed so we can skip over signing it now
|
||||||
|
NSNumber *tsBundleIsPreSignedNum = (NSNumber *)tsBundleIsPreSigned;
|
||||||
|
if([tsBundleIsPreSignedNum boolValue] == YES)
|
||||||
|
{
|
||||||
|
NSLog(@"[signApp] taking fast path for app which declares it has already been CT-signed (%@)", executablePath);
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NSString* certPath = [trollStoreAppPath() stringByAppendingPathComponent:@"cert.p12"];
|
NSString* certPath = [trollStoreAppPath() stringByAppendingPathComponent:@"cert.p12"];
|
||||||
NSString* certArg = [@"-K" stringByAppendingPathComponent:certPath];
|
NSString* certArg = [@"-K" stringByAppendingPathComponent:certPath];
|
||||||
|
|
Loading…
Reference in New Issue