Skip to content

Commit

Permalink
Document new -P functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
CRKatri committed Jul 21, 2022
1 parent 761e019 commit e605d49
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _ldid
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ _arguments \
'-H-[Hash type]:hash:(sha1 sha256)' \
'-I-[Set identifier]:identifier' \
'-K-[Signing private key]:key:_files' \
'-P[Set as platform]' \
'-P-[Set as platform]:number' \
'-U-[Password for -K]' \
'*: :_files'
8 changes: 6 additions & 2 deletions docs/ldid.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.Op Fl I Ns Ar name
.Op Fl K Ns Ar key.p12 Op Fl U Ns Ar password
.Op Fl M
.Op Fl P
.Op Fl P Ns Op Ar num
.Op Fl Q Ns Ar requirements
.Op Fl q
.Op Fl r | Fl S Ns Ar file.xml | Fl s
Expand Down Expand Up @@ -106,8 +106,12 @@ When used with
merge the new and existing entitlements instead of replacing the existing
entitlements, this is useful for adding a few specific entitlements to a
handful of binaries.
.It Fl P
.It Fl P Ns Op Ar num
Mark the Mach-O as a platform binary.
If
.Ar num
is specified, the platform field in the CodeDirectory will be set to that number.
The default is 13, as per Apple binaries.
.It Fl Q Ns Ar requirements.xml
Embed the requirements found in
.Ar requirements .
Expand Down
4 changes: 2 additions & 2 deletions ldid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3144,9 +3144,9 @@ static void usage(const char *argv0) {
fprintf(stderr, "Usage: %s [-Acputype:subtype] [-a] [-C[adhoc | enforcement | expires | hard |\n", argv0);
fprintf(stderr, " host | kill | library-validation | restrict | runtime]] [-D] [-d]\n");
fprintf(stderr, " [-Enum:file] [-e] [-H[sha1 | sha256]] [-h] [-Iname]\n");
fprintf(stderr, " [-Kkey.p12 [-Upassword]] [-M] [-P] [-Qrequirements.xml] [-q]\n");
fprintf(stderr, " [-Kkey.p12 [-Upassword]] [-M] [-P[num]] [-Qrequirements.xml] [-q]\n");
fprintf(stderr, " [-r | -Sfile.xml | -s] [-u] [-arch arch_type] file ...\n");
fprintf(stderr, "Options:\n");
fprintf(stderr, "Common Options:\n");
fprintf(stderr, " -S[file.xml] Pseudo-sign using the entitlements in file.xml\n");
fprintf(stderr, " -Kkey.p12 Sign using private key in key.p12\n");
fprintf(stderr, " -Upassword Use password to unlock key.p12\n");
Expand Down

0 comments on commit e605d49

Please sign in to comment.