mirror of
				https://github.com/opa334/TrollStore.git
				synced 2025-11-04 07:32:36 +08:00 
			
		
		
		
	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
					
				@ -347,6 +347,19 @@ BOOL signApp(NSString* appPath, NSError** error)
 | 
			
		||||
 | 
			
		||||
	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* certArg = [@"-K" stringByAppendingPathComponent:certPath];
 | 
			
		||||
	NSString* errorOutput;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user