Cleanup password change and removal logic.
Replace password with notifyUserPasswordChanged for password changes,
unlock should now be used to unlock keystore instead of calling password
with the current password.
When the user removes their password now only keystore entries that were
created with FLAG_ENCRYPTED will be deleted. Unencrypted entries will
remain. This makes it more concrete that the keystore could be non-empty
while in STATE_UNINITIALIZED, though this was previously possible due to
the state only being checked if FLAG_ENCRYPTED was set.
(cherry-picked from commit 96d6d7868303ad87f1f408c40d3c44bcb39f561e)
Change-Id: I324914c00195d762cbaa8c63084e41fa796b7df8
diff --git a/keystore/keystore_cli.cpp b/keystore/keystore_cli.cpp
index 1e19890..1391abf 100644
--- a/keystore/keystore_cli.cpp
+++ b/keystore/keystore_cli.cpp
@@ -200,11 +200,11 @@
NO_ARG_INT_RETURN(reset);
- SINGLE_ARG_INT_RETURN(password);
+ // TODO: notifyUserPasswordChanged
NO_ARG_INT_RETURN(lock);
- SINGLE_ARG_INT_RETURN(unlock);
+ // TODO: unlock
NO_ARG_INT_RETURN(zero);