Tweak remote_provisioning command line interface

Only print an IRPC's minimum number of keys on versions of the HAL where
it will be meaningful and initialized. Also indicate which options could
not be understood.

Test: atest RemoteProvisioningShellCommandTest
Bug: 265747549
Change-Id: I0dbcd6af5a5de20783b6d57874fb67801a39240d
This commit is contained in:
Andrew Scull
2023-04-20 14:10:25 +00:00
parent 249b56d806
commit 6587776a3c

View File

@@ -134,7 +134,9 @@ class RemoteProvisioningShellCommand extends ShellCommand {
pw.println("supportedEekCurve=" + info.supportedEekCurve);
}
pw.println("uniqueId=" + info.uniqueId);
pw.println("supportedNumKeysInCsr=" + info.supportedNumKeysInCsr);
if (info.versionNumber >= 3) {
pw.println("supportedNumKeysInCsr=" + info.supportedNumKeysInCsr);
}
}
private int list() throws RemoteException {
@@ -153,7 +155,7 @@ class RemoteProvisioningShellCommand extends ShellCommand {
challenge = Base64.getDecoder().decode(getNextArgRequired());
break;
default:
getErrPrintWriter().println("error: unknown option");
getErrPrintWriter().println("error: unknown option " + opt);
return ERROR;
}
}