Flush the auth token table on resetUid
This prevents old stale auth tokens from sticking around after clearing.
Change-Id: I92e48b6d8cdba92cbc70f718cb45a4d96bd12900
diff --git a/keystore/auth_token_table.cpp b/keystore/auth_token_table.cpp
index 2ae10a0..de5d41d 100644
--- a/keystore/auth_token_table.cpp
+++ b/keystore/auth_token_table.cpp
@@ -140,6 +140,10 @@
entries_.end());
}
+void AuthTokenTable::Clear() {
+ entries_.clear();
+}
+
bool AuthTokenTable::IsSupersededBySomeEntry(const Entry& entry) {
return std::any_of(entries_.begin(), entries_.end(),
[&](Entry& e) { return e.Supersedes(entry); });