keystore_cli_v2 --prompt_text expects a UTF-8 string
The argument --prompt_text was parsed as an ASCII string which does not
reflect the aspired featrue set.
Also fixes a typo in an error message
Bug: 74806224
Test: manually tested
Change-Id: Ie534ea03fbe36b74c9584647b52b50f852e7dbb3
diff --git a/keystore/keystore_cli_v2.cpp b/keystore/keystore_cli_v2.cpp
index 870a548..6377ec1 100644
--- a/keystore/keystore_cli_v2.cpp
+++ b/keystore/keystore_cli_v2.cpp
@@ -502,7 +502,7 @@
}
if (promptText.size() == 0) {
- printf("The --promptText parameter cannot be empty.\n");
+ printf("The --prompt_text parameter cannot be empty.\n");
return 1;
}
@@ -615,7 +615,7 @@
command_line->GetSwitchValueASCII("in"),
command_line->GetSwitchValueASCII("out"));
} else if (args[0] == "confirmation") {
- return Confirmation(command_line->GetSwitchValueASCII("prompt_text"),
+ return Confirmation(command_line->GetSwitchValueNative("prompt_text"),
command_line->GetSwitchValueASCII("extra_data"),
command_line->GetSwitchValueASCII("locale"),
command_line->GetSwitchValueASCII("ui_options"),