Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Apr 22, 2024
1 parent a76df13 commit ebea623
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 2 additions & 0 deletions LCJITLessSetupViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ - (void)loadView {
self.title = @"LiveContainer JIT-less setup";

NSData *certData = [LCUtils keychainItem:@"signingCertificate" ofStore:@"com.SideStore.SideStore"];
/* TODO: support AltStore
if (!certData) {
certData = [LCUtils keychainItem:@"signingCertificate" ofStore:@"com.rileytestut.AltStore"];
}
*/
if (!certData) {
[self showDialogTitle:@"Error" message:@"Failed to find certificate" handler:nil];
return;
Expand Down
21 changes: 7 additions & 14 deletions LCUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,13 @@ + (NSProgress *)signAppBundle:(NSURL *)path completionHandler:(void (^)(BOOL suc
NSURL *profilePath = [NSBundle.mainBundle URLForResource:@"embedded" withExtension:@"mobileprovision"];

// Load libraries from Documents, yeah
[[NSBundle bundleWithURL:[storeFrameworksPath URLByAppendingPathComponent:@"OpenSSL.framework"]] loadAndReturnError:&error];
if (error) {
completionHandler(NO, error);
return nil;
}
[[NSBundle bundleWithURL:[storeFrameworksPath URLByAppendingPathComponent:@"Roxas.framework"]] loadAndReturnError:&error];
if (error) {
completionHandler(NO, error);
return nil;
}
[[NSBundle bundleWithURL:[storeFrameworksPath URLByAppendingPathComponent:@"AltStoreCore.framework"]] loadAndReturnError:&error];
if (error) {
completionHandler(NO, error);
return nil;
NSArray *signerFrameworks = @[@"OpenSSL.framework", @"Roxas.framework", @"AltStoreCore.framework"];
for (NSString *framework in signerFrameworks) {
[[NSBundle bundleWithURL:[storeFrameworksPath URLByAppendingPathComponent:framework]] loadAndReturnError:&error];
if (error) {
completionHandler(NO, error);
return nil;
}
}

ALTCertificate *cert = [[NSClassFromString(@"ALTCertificate") alloc] initWithP12Data:self.certificateData password:@""];
Expand Down

0 comments on commit ebea623

Please sign in to comment.