Users don't have to be unlocked to be deleted, so don't worry if we
don't have their key to evict.
Bug:
26847403
Bug:
27441228
Change-Id: Ifd93f620926630aa102a3bb4a5d2d45d34f9b75d
bool success = true;
s_ce_keys.erase(user_id);
std::string raw_ref;
- success &= lookup_key_ref(s_ce_key_raw_refs, user_id, &raw_ref) && evict_key(raw_ref);
+ // If we haven't loaded the CE key, no need to evict it.
+ if (lookup_key_ref(s_ce_key_raw_refs, user_id, &raw_ref)) {
+ success &= evict_key(raw_ref);
+ }
s_ce_key_raw_refs.erase(user_id);
success &= lookup_key_ref(s_de_key_raw_refs, user_id, &raw_ref) && evict_key(raw_ref);
s_de_key_raw_refs.erase(user_id);