Skip to content

Commit 579fb05

Browse files
committed
add dedicated certlist cmd with switch
1 parent 328d1d1 commit 579fb05

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

tools/cmdr.py

+24-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ def settings(args):
8484
return c
8585

8686

87+
def cert_list(args):
88+
c = {"RequestType": "CertificateList"}
89+
if hasattr(args, "managedonly") and args.managedonly:
90+
c["ManagedOnly"] = True
91+
return c
92+
93+
8794
def make_erase_device_command(args):
8895
return {"RequestType": "EraseDevice", "PIN": args.pin}
8996

@@ -141,6 +148,22 @@ def dev_info_subparser(parser):
141148
return dev_info_parser
142149

143150

151+
def cert_list_subparser(parser):
152+
cert_list_parser = parser.add_parser(
153+
"CertificateList",
154+
help="CertificateList MDM command",
155+
aliases=["CertList"],
156+
)
157+
cert_list_parser.add_argument(
158+
"-m",
159+
"--managedonly",
160+
action="store_true",
161+
help="ManagedOnly=true",
162+
)
163+
cert_list_parser.set_defaults(func=cert_list)
164+
return cert_list_parser
165+
166+
144167
def inst_prof_subparser(parser):
145168
inst_prof_parser = parser.add_parser(
146169
"InstallProfile", help="InstallProfile MDM command"
@@ -271,7 +294,6 @@ def main():
271294
for c in [
272295
"ProfileList",
273296
"ProvisioningProfileList",
274-
"CertificateList",
275297
"SecurityInfo",
276298
"RestartDevice",
277299
"ShutDownDevice",
@@ -300,6 +322,7 @@ def main():
300322
sched_update_subparser(subparsers)
301323
account_config_subparser(subparsers)
302324
settings_subparser(subparsers)
325+
cert_list_subparser(subparsers)
303326
make_erase_device_subparser(subparsers)
304327
make_device_lock_subparser(subparsers)
305328

0 commit comments

Comments
 (0)