opa334 / ChOma

C library for manipulating MachO/FAT files and their code signatures
MIT License
337 stars 41 forks source link

Use OpenSSL to sign instead of template blob #12

Closed dhinakg closed 9 months ago

dhinakg commented 11 months ago

Instead of using a crafted template blob, use OpenSSL to add a signer to the App Store CMS blob. With future work, this will let us use the code directory + CMS blob from a donor binary.

Resulting binaries tested on:

Notes:

alfiecg24 commented 11 months ago

We're encoding plists so this introduces a dependency on CoreFoundation

That's no worries, it wouldn't build on non-Darwin systems anyway.

Should the signing code be moved somewhere else or stay in ct_bypass? With some adaptation, this could be used for normal signing, but not out of the box

At some point, I plan to add ad-hoc signing support to ChOma, so I'll probably move everything around when I get around to it. Until then, it can stay where it is.

alfiecg24 commented 9 months ago

Does this work out-of-the-box with TrollStore compilation too?

dhinakg commented 9 months ago

Yup, after copying the updated code into fastPathSign it should just build. I have not retested TrollStore since ChOma became a submodule though