ldid.git
14 months agoRequire user to store streambufs for UnionFolders. master
Jay Freeman (saurik) [Wed, 27 Dec 2017 09:38:22 +0000 (01:38 -0800)] 
Require user to store streambufs for UnionFolders.

15 months agoAdd support for alternate SHA256 code directories.
Jay Freeman (saurik) [Mon, 11 Dec 2017 08:25:25 +0000 (00:25 -0800)] 
Add support for alternate SHA256 code directories.

15 months agoUpdate the URL for libplist (sadly, to GitHub :/).
Jay Freeman (saurik) [Sat, 9 Dec 2017 11:46:00 +0000 (03:46 -0800)] 
Update the URL for libplist (sadly, to GitHub :/).

2 years agoReport progress (in terms of percent and logging).
Jay Freeman (saurik) [Sun, 12 Mar 2017 23:58:35 +0000 (16:58 -0700)] 
Report progress (in terms of percent and logging).

2 years agoAvoid duplicate Find when remapped during iterate.
Jay Freeman (saurik) [Sun, 12 Mar 2017 11:19:48 +0000 (04:19 -0700)] 
Avoid duplicate Find when remapped during iterate.

2 years agoWe need Path in DiskFolder subclass to forge flag.
Jay Freeman (saurik) [Mon, 13 Feb 2017 02:21:15 +0000 (18:21 -0800)] 
We need Path in DiskFolder subclass to forge flag.

2 years agoMake Folder::Find const, removing internal Save().
Jay Freeman (saurik) [Sun, 12 Feb 2017 14:07:19 +0000 (06:07 -0800)] 
Make Folder::Find const, removing internal Save().

2 years agoSupport separate provisioning for bundled plugins.
Jay Freeman (saurik) [Mon, 6 Feb 2017 14:48:38 +0000 (06:48 -0800)] 
Support separate provisioning for bundled plugins.

2 years agoAdd #include <set> that was semi-missing from hpp.
Jay Freeman (saurik) [Wed, 11 Jan 2017 13:34:51 +0000 (05:34 -0800)] 
Add #include <set> that was semi-missing from hpp.

2 years agoAvoid blowing up the stack hashing large binaries.
Jay Freeman (saurik) [Sat, 7 Jan 2017 02:54:37 +0000 (18:54 -0800)] 
Avoid blowing up the stack hashing large binaries.

2 years agoProvide a simple to use implementation of ldid -e.
Jay Freeman (saurik) [Thu, 22 Dec 2016 00:44:35 +0000 (16:44 -0800)] 
Provide a simple to use implementation of ldid -e.

2 years agoSimulated memory map doesn't tolerate limit Align.
Jay Freeman (saurik) [Thu, 13 Oct 2016 10:21:47 +0000 (03:21 -0700)] 
Simulated memory map doesn't tolerate limit Align.

2 years agoIf team ID is not specified, don't output its NUL.
Jay Freeman (saurik) [Sun, 4 Sep 2016 00:39:43 +0000 (17:39 -0700)] 
If team ID is not specified, don't output its NUL.

2 years agoVerify we do not overflow annoying 0x3000 padding.
Jay Freeman (saurik) [Sun, 4 Sep 2016 00:37:23 +0000 (17:37 -0700)] 
Verify we do not overflow annoying 0x3000 padding.

2 years agoAdd guarantee that allocations shouldn't overflow.
Jay Freeman (saurik) [Sat, 27 Aug 2016 07:50:40 +0000 (00:50 -0700)] 
Add guarantee that allocations shouldn't overflow.

2 years agoFix requirement allocation (covered by 0x3000 :/).
Jay Freeman (saurik) [Sat, 27 Aug 2016 07:50:04 +0000 (00:50 -0700)] 
Fix requirement allocation (covered by 0x3000 :/).

2 years agoOnly exclude nested files when bundles are nested.
Jay Freeman (saurik) [Fri, 26 Aug 2016 07:51:12 +0000 (00:51 -0700)] 
Only exclude nested files when bundles are nested.

2 years agoSupport iOS applications that embed WatchKit apps.
Jay Freeman (saurik) [Fri, 26 Aug 2016 07:42:22 +0000 (00:42 -0700)] 
Support iOS applications that embed WatchKit apps.

2 years agoDrastic improvements to nested support (and Mac!).
Jay Freeman (saurik) [Fri, 26 Aug 2016 06:24:52 +0000 (23:24 -0700)] 
Drastic improvements to nested support (and Mac!).

2 years agoChop bool Open() into void Open() and bool Look().
Jay Freeman (saurik) [Fri, 26 Aug 2016 05:06:33 +0000 (22:06 -0700)] 
Chop bool Open() into void Open() and bool Look().

2 years agoAdd support for signing symbolic links (sort of?).
Jay Freeman (saurik) [Fri, 26 Aug 2016 05:05:23 +0000 (22:05 -0700)] 
Add support for signing symbolic links (sort of?).

2 years agoDiskFolder still hasn't been tested #if __WIN32__.
Jay Freeman (saurik) [Fri, 26 Aug 2016 04:17:26 +0000 (21:17 -0700)] 
DiskFolder still hasn't been tested #if __WIN32__.

2 years agoStore SHA256 as hash2 in files2 for CodeDirectory.
Jay Freeman (saurik) [Fri, 26 Aug 2016 02:47:46 +0000 (19:47 -0700)] 
Store SHA256 as hash2 in files2 for CodeDirectory.

2 years agoSupport signing DiskFolders with nested resources.
Jay Freeman (saurik) [Fri, 26 Aug 2016 02:23:27 +0000 (19:23 -0700)] 
Support signing DiskFolders with nested resources.

2 years agoAdd -q and -Q to dump and sign "requirement data".
Jay Freeman (saurik) [Fri, 26 Aug 2016 00:38:13 +0000 (17:38 -0700)] 
Add -q and -Q to dump and sign "requirement data".

2 years agoApparently, I never pushed this fix to ldid -s :/.
Jay Freeman (saurik) [Fri, 26 Aug 2016 00:35:46 +0000 (17:35 -0700)] 
Apparently, I never pushed this fix to ldid -s :/.

2 years agoRemove an extraneous variable I did not ever need.
Jay Freeman (saurik) [Fri, 26 Aug 2016 00:31:46 +0000 (17:31 -0700)] 
Remove an extraneous variable I did not ever need.

2 years agoDetect "non-standard" Mach-O binaries to codesign.
Jay Freeman (saurik) [Sun, 31 Jul 2016 02:59:16 +0000 (19:59 -0700)] 
Detect "non-standard" Mach-O binaries to codesign.

2 years agoDefine local functions static to avoid collisions.
Jay Freeman (saurik) [Sun, 31 Jul 2016 02:58:35 +0000 (19:58 -0700)] 
Define local functions static to avoid collisions.

2 years agoProvide a way to maintain file permissions in IPA.
Jay Freeman (saurik) [Fri, 29 Jul 2016 12:57:28 +0000 (05:57 -0700)] 
Provide a way to maintain file permissions in IPA.

2 years agoSupport renaming files under an ldid::UnionFolder.
Jay Freeman (saurik) [Fri, 29 Jul 2016 07:58:22 +0000 (00:58 -0700)] 
Support renaming files under an ldid::UnionFolder.

2 years agoEmbed team identifier of certificate in signature.
Jay Freeman (saurik) [Fri, 29 Jul 2016 05:33:01 +0000 (22:33 -0700)] 
Embed team identifier of certificate in signature.

2 years agoSign embedded dylibs (that are in top-level .app).
Jay Freeman (saurik) [Fri, 29 Jul 2016 05:32:47 +0000 (22:32 -0700)] 
Sign embedded dylibs (that are in top-level .app).

2 years agoOur list of excluded files/folders was incomplete.
Jay Freeman (saurik) [Thu, 28 Jul 2016 23:54:37 +0000 (16:54 -0700)] 
Our list of excluded files/folders was incomplete.

2 years agoUnionFolder clobbered sub-paths in nested bundles.
Jay Freeman (saurik) [Thu, 28 Jul 2016 04:39:23 +0000 (21:39 -0700)] 
UnionFolder clobbered sub-paths in nested bundles.

3 years agoIf the binary has an embedded Info.plist, sign it.
Jay Freeman (saurik) [Fri, 13 Nov 2015 08:46:45 +0000 (00:46 -0800)] 
If the binary has an embedded Info.plist, sign it.

3 years agoMake the sha1 interface also work for std::vector.
Jay Freeman (saurik) [Fri, 13 Nov 2015 08:19:12 +0000 (00:19 -0800)] 
Make the sha1 interface also work for std::vector.

3 years agoRemove a number of now-ancient MachHeader helpers.
Jay Freeman (saurik) [Fri, 13 Nov 2015 08:14:42 +0000 (00:14 -0800)] 
Remove a number of now-ancient MachHeader helpers.

3 years agoAllow -K argument to not specify a key (why not?).
Jay Freeman (saurik) [Fri, 13 Nov 2015 08:01:48 +0000 (00:01 -0800)] 
Allow -K argument to not specify a key (why not?).

3 years agoImprove alignment (end-of-file and non-FAT files).
Jay Freeman (saurik) [Fri, 13 Nov 2015 08:01:40 +0000 (00:01 -0800)] 
Improve alignment (end-of-file and non-FAT files).

3 years agoAdd another hastily and poorly-thought-out #ifdef.
Jay Freeman (saurik) [Thu, 12 Nov 2015 10:02:03 +0000 (02:02 -0800)] 
Add another hastily and poorly-thought-out #ifdef.

3 years agoAdd -u, which prints the current_version of UIKit.
Jay Freeman (saurik) [Sun, 18 Oct 2015 20:47:25 +0000 (13:47 -0700)] 
Add -u, which prints the current_version of UIKit.

3 years agoSome of my build environments litter object files.
Jay Freeman (saurik) [Sun, 11 Oct 2015 10:29:21 +0000 (03:29 -0700)] 
Some of my build environments litter object files.

3 years agoTechnically, I should have these two header files.
Jay Freeman (saurik) [Sun, 11 Oct 2015 10:29:07 +0000 (03:29 -0700)] 
Technically, I should have these two header files.

3 years agoAdd hacky flags to turn off more complex features.
Jay Freeman (saurik) [Sun, 11 Oct 2015 00:09:28 +0000 (17:09 -0700)] 
Add hacky flags to turn off more complex features.

3 years agoAdd hacky flag to dis-require hash(), removing -T.
Jay Freeman (saurik) [Sun, 11 Oct 2015 00:06:02 +0000 (17:06 -0700)] 
Add hacky flag to dis-require hash(), removing -T.

3 years agoUse internal build of libplist instead of -lplist.
Jay Freeman (saurik) [Sat, 10 Oct 2015 23:55:18 +0000 (16:55 -0700)] 
Use internal build of libplist instead of -lplist.

3 years agoUse Apple's CommonCrypto for SHA-1 when __APPLE__.
Jay Freeman (saurik) [Sat, 10 Oct 2015 22:36:30 +0000 (15:36 -0700)] 
Use Apple's CommonCrypto for SHA-1 when __APPLE__.

3 years agoPort to Apple's pathetic third-world toolchain :/.
Jay Freeman (saurik) [Sat, 10 Oct 2015 21:40:36 +0000 (14:40 -0700)] 
Port to Apple's pathetic third-world toolchain :/.

3 years agoSort of support signing bundles with entitlements.
Jay Freeman (saurik) [Sat, 10 Oct 2015 21:07:32 +0000 (14:07 -0700)] 
Sort of support signing bundles with entitlements.

3 years agoUnionFolder (code for Impactor) should be in ldid.
Jay Freeman (saurik) [Sat, 10 Oct 2015 21:04:44 +0000 (14:04 -0700)] 
UnionFolder (code for Impactor) should be in ldid.

3 years agoSubFolder should take a reference (not a pointer).
Jay Freeman (saurik) [Sat, 10 Oct 2015 21:03:39 +0000 (14:03 -0700)] 
SubFolder should take a reference (not a pointer).

3 years agoAdd ldid::Bundle to the header file, for Impactor.
Jay Freeman (saurik) [Mon, 28 Sep 2015 11:02:15 +0000 (04:02 -0700)] 
Add ldid::Bundle to the header file, for Impactor.

3 years agoAvoid libplist++ (it's slow and slightly awkward).
Jay Freeman (saurik) [Mon, 28 Sep 2015 10:43:53 +0000 (03:43 -0700)] 
Avoid libplist++ (it's slow and slightly awkward).

3 years agoReplace Windows stat::st_mode with dirent::d_type.
Jay Freeman (saurik) [Mon, 28 Sep 2015 10:16:41 +0000 (03:16 -0700)] 
Replace Windows stat::st_mode with dirent::d_type.

3 years agoWindows doesn't use the mode parameter on mkdir().
Jay Freeman (saurik) [Mon, 28 Sep 2015 10:08:33 +0000 (03:08 -0700)] 
Windows doesn't use the mode parameter on mkdir().

3 years agoSadly, g++ doesn't let me cast empty initializers.
Jay Freeman (saurik) [Mon, 28 Sep 2015 09:53:52 +0000 (02:53 -0700)] 
Sadly, g++ doesn't let me cast empty initializers.

3 years agoAvoid dirent::d_namlen (not there on Linux glibc).
Jay Freeman (saurik) [Mon, 28 Sep 2015 09:48:10 +0000 (02:48 -0700)] 
Avoid dirent::d_namlen (not there on Linux glibc).

3 years agoGet access to std::auto_ptr by including <memory>.
Jay Freeman (saurik) [Mon, 28 Sep 2015 09:46:42 +0000 (02:46 -0700)] 
Get access to std::auto_ptr by including <memory>.

3 years agoAvoid FTS (broken in glibc, not present on Win32).
Jay Freeman (saurik) [Mon, 28 Sep 2015 09:38:55 +0000 (02:38 -0700)] 
Avoid FTS (broken in glibc, not present on Win32).

3 years agoFinish implementating application bundle codesign.
Jay Freeman (saurik) [Mon, 28 Sep 2015 08:13:27 +0000 (01:13 -0700)] 
Finish implementating application bundle codesign.

3 years agoLink libplist and switch to their C++ wrapper API.
Jay Freeman (saurik) [Mon, 28 Sep 2015 03:50:12 +0000 (20:50 -0700)] 
Link libplist and switch to their C++ wrapper API.

3 years agoUse std::string more often, and factor out Commit.
Jay Freeman (saurik) [Mon, 28 Sep 2015 03:48:48 +0000 (20:48 -0700)] 
Use std::string more often, and factor out Commit.

3 years agoSlightly improve prototypes for Sign and Allocate.
Jay Freeman (saurik) [Mon, 28 Sep 2015 03:43:40 +0000 (20:43 -0700)] 
Slightly improve prototypes for Sign and Allocate.

3 years agoStandardize _syscall as exactly one function call.
Jay Freeman (saurik) [Mon, 28 Sep 2015 01:54:47 +0000 (18:54 -0700)] 
Standardize _syscall as exactly one function call.

3 years agoAllow more useful error messages in _assert macro.
Jay Freeman (saurik) [Mon, 28 Sep 2015 01:53:45 +0000 (18:53 -0700)] 
Allow more useful error messages in _assert macro.

3 years agoMove Functor implementation to header for the API.
Jay Freeman (saurik) [Sun, 27 Sep 2015 22:14:07 +0000 (15:14 -0700)] 
Move Functor implementation to header for the API.

3 years agoRename resign to Sign and put into ldid namespace.
Jay Freeman (saurik) [Sun, 27 Sep 2015 22:02:22 +0000 (15:02 -0700)] 
Rename resign to Sign and put into ldid namespace.

3 years agoSimplify implementation of temporary reallocation.
Jay Freeman (saurik) [Sun, 27 Sep 2015 10:35:27 +0000 (03:35 -0700)] 
Simplify implementation of temporary reallocation.

3 years agoPush few filename variables into the deeper scope.
Jay Freeman (saurik) [Sun, 27 Sep 2015 10:09:53 +0000 (03:09 -0700)] 
Push few filename variables into the deeper scope.

3 years agoIndirect support for .app signing via new -E flag.
Jay Freeman (saurik) [Mon, 21 Sep 2015 19:50:36 +0000 (12:50 -0700)] 
Indirect support for .app signing via new -E flag.

3 years agoRemove unused constructor in already-long Functor.
Jay Freeman (saurik) [Mon, 21 Sep 2015 18:56:54 +0000 (11:56 -0700)] 
Remove unused constructor in already-long Functor.

3 years agoCorrect incompatible flag checks (support for -s).
Jay Freeman (saurik) [Mon, 21 Sep 2015 18:56:22 +0000 (11:56 -0700)] 
Correct incompatible flag checks (support for -s).

3 years agoBe more consistent in how size constants are used.
Jay Freeman (saurik) [Mon, 21 Sep 2015 18:54:17 +0000 (11:54 -0700)] 
Be more consistent in how size constants are used.

3 years agoApply static to most (if not all) local functions.
Jay Freeman (saurik) [Mon, 21 Sep 2015 18:53:19 +0000 (11:53 -0700)] 
Apply static to most (if not all) local functions.

3 years agoUse PKCS12 files to compile a real code signature.
Jay Freeman (saurik) [Mon, 21 Sep 2015 09:41:24 +0000 (02:41 -0700)] 
Use PKCS12 files to compile a real code signature.

3 years agoGenerally prefer data.empty() to data.size() == 0.
Jay Freeman (saurik) [Mon, 21 Sep 2015 08:09:34 +0000 (01:09 -0700)] 
Generally prefer data.empty() to data.size() == 0.

3 years agoReimplement requirements using newer abstractions.
Jay Freeman (saurik) [Mon, 21 Sep 2015 07:05:11 +0000 (00:05 -0700)] 
Reimplement requirements using newer abstractions.

3 years agoMove repetitive Blob magic/length logic to insert.
Jay Freeman (saurik) [Mon, 21 Sep 2015 06:44:16 +0000 (23:44 -0700)] 
Move repetitive Blob magic/length logic to insert.

3 years agoAbstract SuperBlob helper to support requirements.
Jay Freeman (saurik) [Mon, 21 Sep 2015 06:28:25 +0000 (23:28 -0700)] 
Abstract SuperBlob helper to support requirements.

3 years agoPort ldid to build inside of Impactor for Windows.
Jay Freeman (saurik) [Mon, 21 Sep 2015 04:48:20 +0000 (21:48 -0700)] 
Port ldid to build inside of Impactor for Windows.

3 years agoUse an std::string to store the name being signed.
Jay Freeman (saurik) [Mon, 21 Sep 2015 02:02:17 +0000 (19:02 -0700)] 
Use an std::string to store the name being signed.

3 years agoComplete padding of final fat code directory blob.
Jay Freeman (saurik) [Mon, 21 Sep 2015 01:52:15 +0000 (18:52 -0700)] 
Complete padding of final fat code directory blob.

3 years agoAvoid special case for removal of code signatures.
Jay Freeman (saurik) [Mon, 21 Sep 2015 01:45:09 +0000 (18:45 -0700)] 
Avoid special case for removal of code signatures.

3 years agoUpdate copyright year. (Wow, ldid is very old ;P.)
Jay Freeman (saurik) [Mon, 21 Sep 2015 00:45:13 +0000 (17:45 -0700)] 
Update copyright year. (Wow, ldid is very old ;P.)

3 years agoDrop dependency on minimal as we port to Impactor.
Jay Freeman (saurik) [Mon, 21 Sep 2015 00:43:56 +0000 (17:43 -0700)] 
Drop dependency on minimal as we port to Impactor.

3 years agoInternally stream signed output to std::streambuf.
Jay Freeman (saurik) [Mon, 21 Sep 2015 00:38:34 +0000 (17:38 -0700)] 
Internally stream signed output to std::streambuf.

3 years agoExtract reallocation/signature to helper function.
Jay Freeman (saurik) [Sun, 20 Sep 2015 01:39:15 +0000 (18:39 -0700)] 
Extract reallocation/signature to helper function.

3 years agoSupport LC_ENCRYPTION_INFO_64, for 64-bit decrypt.
Jay Freeman (saurik) [Tue, 25 Aug 2015 08:14:30 +0000 (01:14 -0700)] 
Support LC_ENCRYPTION_INFO_64, for 64-bit decrypt.

3 years agoMerge -r into -S and remove all non-obvious flags.
Jay Freeman (saurik) [Tue, 25 Aug 2015 07:23:34 +0000 (00:23 -0700)] 
Merge -r into -S and remove all non-obvious flags.

3 years agoAvoid using minimal/mapping.h (use internal mmap).
Jay Freeman (saurik) [Tue, 25 Aug 2015 00:01:43 +0000 (17:01 -0700)] 
Avoid using minimal/mapping.h (use internal mmap).

3 years agoThe Archive Identity Editor is a separate project.
Jay Freeman (saurik) [Mon, 24 Aug 2015 23:29:49 +0000 (16:29 -0700)] 
The Archive Identity Editor is a separate project.

3 years agoAvoid using minimal/string.h (prefer std::string).
Jay Freeman (saurik) [Mon, 24 Aug 2015 23:12:32 +0000 (16:12 -0700)] 
Avoid using minimal/string.h (prefer std::string).

3 years agoUse OpenSSL to implement SHA1 instead of our copy.
Jay Freeman (saurik) [Sun, 23 Aug 2015 09:21:23 +0000 (02:21 -0700)] 
Use OpenSSL to implement SHA1 instead of our copy.

3 years agoAvoid sharing linkedit_data_commands in FAT files.
Jay Freeman (saurik) [Fri, 21 Aug 2015 12:57:05 +0000 (05:57 -0700)] 
Avoid sharing linkedit_data_commands in FAT files.

3 years agoSeparate lookup of LC_ENCRYPTION_INFO from usages.
Jay Freeman (saurik) [Fri, 21 Aug 2015 12:53:29 +0000 (05:53 -0700)] 
Separate lookup of LC_ENCRYPTION_INFO from usages.

3 years agoAdd libplist (and libcnary) so to sign Info.plist.
Jay Freeman (saurik) [Fri, 21 Aug 2015 12:32:58 +0000 (05:32 -0700)] 
Add libplist (and libcnary) so to sign Info.plist.

3 years agoMaintain fat_arch.align when allocating fat files. v1.2.1
Jay Freeman (saurik) [Mon, 29 Jun 2015 19:04:31 +0000 (12:04 -0700)] 
Maintain fat_arch.align when allocating fat files.

3 years agoAlign size of a final embedded Mach-O to 16 bytes. v1.2.0
Jay Freeman (saurik) [Sat, 27 Jun 2015 04:32:50 +0000 (21:32 -0700)] 
Align size of a final embedded Mach-O to 16 bytes.

3 years agoAlign __LINKEDIT segment vmsize to match filesize.
Jay Freeman (saurik) [Sat, 27 Jun 2015 04:30:47 +0000 (21:30 -0700)] 
Align __LINKEDIT segment vmsize to match filesize.