mirror of https://github.com/opa334/TrollStore.git
Improve check for main binary
This commit is contained in:
parent
713ecf43a5
commit
cddfdcfed1
|
@ -698,16 +698,16 @@ int signApp(NSString* appPath)
|
||||||
}
|
}
|
||||||
else if (r == 2) {
|
else if (r == 2) {
|
||||||
NSLog(@"[%@] Cannot apply CoreTrust bypass on an encrypted binary!", filePath);
|
NSLog(@"[%@] Cannot apply CoreTrust bypass on an encrypted binary!", filePath);
|
||||||
// Check if the second-to-last path component ends with .app
|
if (isSameFile(filePath, mainExecutablePath)) {
|
||||||
// If it is, the main binary is encrypted
|
// If this is the main binary, this error is fatal
|
||||||
// If not, it's likely an extension or plugin, which can remain encrypted
|
|
||||||
if ([filePath.pathComponents[filePath.pathComponents.count - 2] hasSuffix:@".app"]) {
|
|
||||||
NSLog(@"[%@] Main binary is encrypted, cannot continue!", filePath);
|
NSLog(@"[%@] Main binary is encrypted, cannot continue!", filePath);
|
||||||
fat_free(fat);
|
fat_free(fat);
|
||||||
return 180;
|
return 180;
|
||||||
}
|
}
|
||||||
hasAdditionalEncryptedBinaries = YES;
|
else {
|
||||||
|
// If not, we can continue but want to show a warning after the app is installed
|
||||||
|
hasAdditionalEncryptedBinaries = YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NSLog(@"[%@] CoreTrust bypass failed!!! :(", filePath);
|
NSLog(@"[%@] CoreTrust bypass failed!!! :(", filePath);
|
||||||
|
|
Loading…
Reference in New Issue