You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to use this issue as a dumping ground as I explore a pure-Ruby alternative to #260.
At a high level:
If a binary already contains an LC_CODE_SIGNATURE, we need to erase it and replace it with our own (ad-hoc) signature
If a binary doesn't contain an LC_CODE_SIGNATURE, we need to add a new load command containing one
That's not the end of things:
LC_CODE_SIGNATUREreferences the signing data, but doesn't actually contain it. It's actually hiding in the __LINKEDIT segment. That means that we'll need to rewrite (and probably resize) __LINKEDIT.