Skip to content

Commit

Permalink
Update ChOma, update XPF
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Jan 1, 2025
1 parent ef7a592 commit 55fa1d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion BaseBin/ChOma
2 changes: 1 addition & 1 deletion BaseBin/XPF
Submodule XPF updated 43 files
+2 −1 .gitignore
+3 −2 external/include/choma/CSBlob.h
+195 −0 external/include/choma/CachePatching.h
+1 −1 external/include/choma/CodeDirectory.h
+24 −0 external/include/choma/DER.h
+79 −0 external/include/choma/DyldSharedCache.h
+9 −0 external/include/choma/Entitlements.h
+0 −46 external/include/choma/FAT.h
+51 −0 external/include/choma/Fat.h
+3 −3 external/include/choma/Host.h
+15 −3 external/include/choma/MachO.h
+1 −1 external/include/choma/MachOLoadCommand.h
+2 −2 external/include/choma/PatchFinder.h
+2 −1 external/include/choma/Util.h
+2 −0 external/include/choma/arm64.h
+617 −0 external/include/choma/dyld_cache_format.h
+306 −0 external/include/choma/fixup-chains.h
+3 −2 external/ios/include/choma/CSBlob.h
+195 −0 external/ios/include/choma/CachePatching.h
+1 −1 external/ios/include/choma/CodeDirectory.h
+24 −0 external/ios/include/choma/DER.h
+79 −0 external/ios/include/choma/DyldSharedCache.h
+9 −0 external/ios/include/choma/Entitlements.h
+0 −46 external/ios/include/choma/FAT.h
+51 −0 external/ios/include/choma/Fat.h
+3 −3 external/ios/include/choma/Host.h
+15 −3 external/ios/include/choma/MachO.h
+1 −1 external/ios/include/choma/MachOLoadCommand.h
+2 −2 external/ios/include/choma/PatchFinder.h
+2 −1 external/ios/include/choma/Util.h
+2 −0 external/ios/include/choma/arm64.h
+617 −0 external/ios/include/choma/dyld_cache_format.h
+306 −0 external/ios/include/choma/fixup-chains.h
+ external/ios/lib/libchoma.a
+ external/ios/lib/libchoma.dylib
+ external/lib/libchoma.a
+ external/lib/libchoma.dylib
+9 −3 src/cli/main.c
+63 −2 src/common.c
+27 −5 src/non_ppl.c
+4 −4 src/ppl.c
+34 −19 src/xpf.c
+2 −2 src/xpf.h
12 changes: 6 additions & 6 deletions BaseBin/libjailbreak/src/signatures.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <choma/FAT.h>
#include <choma/Fat.h>
#include <choma/MachO.h>
#include <choma/Host.h>
#include <mach-o/dyld.h>
#include "trustcache.h"

#import <Foundation/Foundation.h>

MachO *ljb_fat_find_preferred_slice(FAT *fat)
MachO *ljb_fat_find_preferred_slice(Fat *fat)
{
cpu_type_t cputype;
cpu_subtype_t cpusubtype;
Expand Down Expand Up @@ -77,7 +77,7 @@ bool csd_superblob_is_adhoc_signed(CS_DecodedSuperBlob *superblob)
NSString *(^resolveRpaths)(NSString *) = ^NSString *(NSString *binaryPath) {
if (!binaryPath) return nil;
__block NSString *rpathResolvedPath = nil;
FAT *fat = fat_init_from_path(binaryPath.fileSystemRepresentation);
Fat *fat = fat_init_from_path(binaryPath.fileSystemRepresentation);
if (fat) {
MachO *macho = ljb_fat_find_preferred_slice(fat);
if (macho) {
Expand Down Expand Up @@ -138,7 +138,7 @@ void macho_collect_untrusted_cdhashes(const char *path, const char *callerImageP
};

if (!callerExecutablePath) {
FAT *mainFAT = fat_init_from_path(path);
Fat *mainFAT = fat_init_from_path(path);
if (mainFAT) {
MachO *mainMachO = NULL;
if (preferredArchCount > 0) {
Expand Down Expand Up @@ -167,7 +167,7 @@ void macho_collect_untrusted_cdhashes(const char *path, const char *callerImageP
__weak __block void (^binaryTrustHandler_recurse)(NSString *, NSString *, NSString *);
void (^binaryTrustHandler)(NSString *, NSString *, NSString *) = ^(NSString *binaryPath, NSString *sourceImagePath, NSString *sourceExecutablePath) {
NSString *resolvedBinaryPath = resolveDependencyPath(binaryPath, sourceImagePath, sourceExecutablePath);
FAT *fat = fat_init_from_path(resolvedBinaryPath.fileSystemRepresentation);
Fat *fat = fat_init_from_path(resolvedBinaryPath.fileSystemRepresentation);
if (!fat) return;
MachO *macho = NULL;
if ([binaryPath isEqualToString:sourceExecutablePath]) {
Expand Down Expand Up @@ -196,7 +196,7 @@ void macho_collect_untrusted_cdhashes(const char *path, const char *callerImageP
if (csd_superblob_is_adhoc_signed(decodedSuperblob)) {
isAdhocSigned = true;
cdhash_t cdhash;
if (csd_superblob_calculate_best_cdhash(decodedSuperblob, cdhash) == 0) {
if (csd_superblob_calculate_best_cdhash(decodedSuperblob, cdhash, NULL) == 0) {
if (!cdhashesContains(cdhash)) {
if (!is_cdhash_trustcached(cdhash)) {
// If something is trustcached we do not want to add it to your array
Expand Down

0 comments on commit 55fa1d2

Please sign in to comment.