diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..22c0428 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ChOma"] + path = ChOma + url = https://github.com/opa334/ChOma diff --git a/ChOma b/ChOma new file mode 160000 index 0000000..b819acb --- /dev/null +++ b/ChOma @@ -0,0 +1 @@ +Subproject commit b819acbad86eae7a187062d344a1cb62c60daa9b diff --git a/Exploits/fastPathSign/Makefile b/Exploits/fastPathSign/Makefile index e1a3981..9cbc217 100644 --- a/Exploits/fastPathSign/Makefile +++ b/Exploits/fastPathSign/Makefile @@ -2,10 +2,10 @@ TARGET = fastPathSign CC = clang -CFLAGS = -framework Foundation -framework CoreServices -framework Security -fobjc-arc $(shell pkg-config --cflags libcrypto) -Isrc/external/include -LDFLAGS = $(shell pkg-config --libs libcrypto) -Lsrc/external/lib -lchoma +CFLAGS = -framework Foundation -framework CoreServices -framework Security -fobjc-arc $(shell pkg-config --cflags libcrypto) -I../../ChOma/src +LDFLAGS = $(shell pkg-config --libs libcrypto) -$(TARGET): $(wildcard src/*.m src/*.c) +$(TARGET): $(wildcard src/*.m src/*.c ../../ChOma/src/*.c) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ clean: diff --git a/Exploits/fastPathSign/src/coretrust_bug.c b/Exploits/fastPathSign/src/coretrust_bug.c index 6e2ec9d..6aaa9fe 100644 --- a/Exploits/fastPathSign/src/coretrust_bug.c +++ b/Exploits/fastPathSign/src/coretrust_bug.c @@ -3,16 +3,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "CSBlob.h" +#include "MachOByteOrder.h" +#include "MachO.h" +#include "Host.h" +#include "MemoryStream.h" +#include "FileStream.h" +#include "BufferedStream.h" +#include "SignOSSL.h" +#include "CodeDirectory.h" +#include "Base64.h" #include "Templates/AppStoreCodeDirectory.h" #include "Templates/SignatureBlob.h" #include "Templates/DecryptedSignature.h" diff --git a/Exploits/fastPathSign/src/external/.gitignore b/Exploits/fastPathSign/src/external/.gitignore deleted file mode 100644 index 345fc58..0000000 --- a/Exploits/fastPathSign/src/external/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -include/choma -lib/libchoma.* diff --git a/Exploits/fastPathSign/src/main.m b/Exploits/fastPathSign/src/main.m index 269e99b..b601632 100644 --- a/Exploits/fastPathSign/src/main.m +++ b/Exploits/fastPathSign/src/main.m @@ -1,9 +1,9 @@ #include "codesign.h" #include "coretrust_bug.h" -#include -#include -#include -#include +#include "FAT.h" +#include "MachO.h" +#include "FileStream.h" +#include "Host.h" #include char *extract_preferred_slice(const char *fatPath) diff --git a/Makefile b/Makefile index 3a9fd52..7b62de6 100644 --- a/Makefile +++ b/Makefile @@ -75,15 +75,4 @@ build_installer64e: endif -update-choma: - rm -rf _build/.choma - mkdir -p _build/.choma - git clone --recursive https://github.com/opa334/ChOma _build/.choma - make -C _build/.choma install TARGET=ios INSTALL_PATH=../../RootHelper/external - rm RootHelper/external/lib/libchoma.dylib - make -C _build/.choma clean - make -C _build/.choma install INSTALL_PATH=../../Exploits/fastPathSign/src/external - rm Exploits/fastPathSign/src/external/lib/libchoma.dylib - rm -rf _build/.choma - .PHONY: $(TOPTARGETS) pre_build assemble_trollstore make_trollhelper_package make_trollhelper_embedded build_installer15 build_installer64e \ No newline at end of file diff --git a/RootHelper/Makefile b/RootHelper/Makefile index d13b04f..4b62acb 100644 --- a/RootHelper/Makefile +++ b/RootHelper/Makefile @@ -7,9 +7,9 @@ include $(THEOS)/makefiles/common.mk TOOL_NAME = trollstorehelper -trollstorehelper_FILES = $(wildcard *.m) $(wildcard ../Shared/*.m) ../Exploits/fastPathSign/src/coretrust_bug.c ../Exploits/fastPathSign/src/codesign.m -trollstorehelper_CFLAGS = -fobjc-arc -I../Shared $(shell pkg-config --cflags libcrypto) -Iexternal/include -I../Exploits/fastPathSign/src -trollstorehelper_LDFLAGS = -Lexternal/lib -lcrypto -lchoma +trollstorehelper_FILES = $(wildcard *.m) $(wildcard ../Shared/*.m) $(wildcard ../ChOma/src/*.c) ../Exploits/fastPathSign/src/coretrust_bug.c ../Exploits/fastPathSign/src/codesign.m +trollstorehelper_CFLAGS = -fobjc-arc -I../Shared $(shell pkg-config --cflags libcrypto) -I../ChOma/src -I../Exploits/fastPathSign/src +trollstorehelper_LDFLAGS = -L../ChOma/external/ios -lcrypto trollstorehelper_CODESIGN_FLAGS = --entitlements entitlements.plist trollstorehelper_INSTALL_PATH = /usr/local/bin trollstorehelper_LIBRARIES = archive diff --git a/RootHelper/external/.gitignore b/RootHelper/external/.gitignore deleted file mode 100644 index 153d5a2..0000000 --- a/RootHelper/external/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -include/choma -lib/libchoma.* \ No newline at end of file diff --git a/RootHelper/external/lib/libcrypto.a b/RootHelper/external/lib/libcrypto.a deleted file mode 100644 index 99a37ac..0000000 Binary files a/RootHelper/external/lib/libcrypto.a and /dev/null differ diff --git a/RootHelper/main.m b/RootHelper/main.m index 7e339af..12a42e0 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -14,10 +14,10 @@ #ifndef EMBEDDED_ROOT_HELPER #import "codesign.h" #import "coretrust_bug.h" -#import -#import -#import -#import +#import "FAT.h" +#import "MachO.h" +#import "FileStream.h" +#import "Host.h" #endif #import