2 .\" Copyright (c) 2021-2022 Procursus Team <team@procurs.us>
3 .\" SPDX-License-Identifier: AGPL-3.0-or-later
10 .Nd Link Identity Editor
13 .Op Fl A Ns Ar cputype : Ns Ar subtype
15 .Op Fl C Ns Op Ar adhoc | Ar enforcement | Ar expires | Ar hard | Ar host | Ar kill | Ar library-validation | Ar restrict | Ar runtime
18 .Op Fl E Ns Ar num : Ns Ar file
20 .Op Fl H Ns Op Ar sha1 | Ar sha256
23 .Op Fl K Ns Ar key.p12 Op Fl U Ns Ar password
26 .Op Fl Q Ns Ar requirements
28 .Op Fl r | Fl S Ns Ar file.xml | Fl s
30 .Op Fl arch Ar arch_type
34 adds SHA1 and SHA256 hashes to a Mach-O file so that they can be run
35 on a system that has validation but not signature verification.
36 .Bl -tag -width -indent
37 .It Fl A Ns Ar cputype : Ns Ar subtype
39 .Fl a , Fl D , Fl e , Fl h , Fl q ,
42 only act on the slice specified by
49 should both be integers.
51 Print the CPU types and subtypes in hexadecimal.
52 .It Fl arch Ar arch_type
55 except the name of the architecture is used.
56 The list of currently known
60 This is a Procursus extension.
61 .It Fl C Ns Op Ar adhoc | Ar enforcement | Ar expires | Ar hard | Ar host | Ar kill | Ar library-validation | Ar restrict | Ar runtime
62 Specify the option flags to embed in the code signature.
65 for details about these options.
69 Print the cryptid in the binaries if it exists.
70 .It Fl E Ns Ar num : Ns Ar file
73 in the special codesign slot at
76 Print the entitlements in each slice, or the slice specified by
82 .It Fl H Ns Op Ar sha1 | Ar sha256
83 Disable the hash not specified.
84 This is useful to replicate the default behavior of
86 which only provides an sha256 signature.
88 Print information about the signature, such as
89 hash types, flags, CDHash, and CodeDirectory version to
92 Set the identifier used in the binaries signature to
94 If not specified, the basename of the binary is used.
95 .It Fl K Ns Ar key.p12
96 Sign using the identity in
98 This will give the binary a valid signature so that it can be run
99 on a system with signature validation.
102 has a password you will be prompted for it,
103 or you can specify from the command line with
108 merge the new and existing entitlements instead of replacing the existing
109 entitlements, this is useful for adding a few specific entitlements to a
111 .It Fl P Ns Op Ar num
112 Mark the Mach-O as a platform binary.
115 is specified, the platform field in the CodeDirectory will be set to that number.
116 The default is 13, as per Apple binaries.
117 Specifying the platform to set to using
119 is a Procursus extension.
120 .It Fl Q Ns Ar requirements.xml
121 Embed the requirements found in
124 Print embedded requirements of the binaries.
126 Remove the signature from the Mach-O.
127 .It Fl S Ns Op Ar file.xml
128 Pseudo-sign the Mach-O binaries.
131 is specified then the entitlements found in
133 will be embedded in the Mach-O.
135 Resign the Mach-O binaries while keeping the existing entitlements.
136 .It Fl U Ns Ar password
139 as the password for the p12 certificate instead of prompting.
140 This is a Procursus extension.
142 If the binary was linked against UIKit, then print the UIKit version that the
143 Mach-O binaries were linked against.
152 with no entitlements.
156 .Dl "ldid -Cadhoc -K/path/to/key.p12 -Sent.xml file"
162 with the entitlements found in
164 and mark it as an adhoc signature.
168 .Dl "ldid -Sent.xml -M file"
170 will add the entitlements in
172 to the entitlements already in
177 .Dl "ldid -e file > ent.xml"
179 will save the entitlements found in each slice of
188 utility was written by
189 .An Jay \*qSaurik\*q Freeman .
190 iPhoneOS 1.2.0 and 2.0 support was added on April 6, 2008.
192 was added on June 13, 2008.
193 SHA256 support was added on August 25, 2016, fixing iOS 11 support.
194 iOS 14 support was added on July 31, 2020 by
196 iOS 15 support was added on June 11, 2021.