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 For compatibility reasons it also acts as
72 but this will be removed in the future.
73 .It Fl E Ns Ar num : Ns Ar file
76 in the special codesign slot at
79 Print the entitlements in each slice, or the slice specified by
83 .It Fl H Ns Op Ar sha1 | Ar sha256
84 Disable the hash not specified.
85 This is useful to replicate the default behavior of
87 which only provides an sha256 signature.
89 Print information about the signature, such as
90 hash types, flags, CDHash, and CodeDirectory version to
93 Set the identifier used in the binaries signature to
95 If not specified, the basename of the binary is used.
96 .It Fl K Ns Ar key.p12
97 Sign using the identity in
99 This will give the binary a valid signature so that it can be run
100 on a system with signature validation.
103 has a password you will be prompted for it,
104 or you can specify from the command line with
109 merge the new and existing entitlements instead of replacing the existing
110 entitlements, this is useful for adding a few specific entitlements to a
113 Mark the Mach-O as a platform binary.
114 .It Fl Q Ns Ar requirements.xml
115 Embed the requirements found in
118 Print embedded requirements of the binaries.
120 Remove the signature from the Mach-O.
121 .It Fl S Ns Op Ar file.xml
122 Pseudo-sign the Mach-O binaries.
125 is specified then the entitlements found in
127 will be embedded in the Mach-O.
129 Resign the Mach-O binaries while keeping the existing entitlements.
130 .It Fl U Ns Ar password
133 as the password for the p12 certificate instead of prompting.
134 This is a Procursus extension.
136 If the binary was linked against UIKit, then print the UIKit version that the
137 Mach-O binaries were linked against.
146 with no entitlements.
150 .Dl "ldid -Cadhoc -K/path/to/key.p12 -Sent.xml file"
156 with the entitlements found in
158 and mark it as an adhoc signature.
162 .Dl "ldid -Sent.xml -M file"
164 will add the entitlements in
166 to the entitlements already in
171 .Dl "ldid -e file > ent.xml"
173 will save the entitlements found in each slice of
182 utility was written by
183 .An Jay \*qSaurik\*q Freeman .
184 iPhoneOS 1.2.0 and 2.0 support was added on April 6, 2008.
186 was added on June 13, 2008.
187 SHA256 support was added on August 25, 2016, fixing iOS 11 support.
188 iOS 14 support was added on July 31, 2020 by
190 iOS 15 support was added on June 11, 2021.