Leave RKPD in a "good" state after tests

Test: keystore2_test
Change-Id: Ic3ed6f468065f56120305ca62ec93ac85bd5f892
This commit is contained in:
Tri Vo 2023-02-01 14:18:18 -08:00
parent e8bb7f6ab5
commit fc1794914d

View file

@ -590,6 +590,9 @@ mod tests {
let new_key =
get_rkpd_attestation_key(&SecurityLevel::TRUSTED_ENVIRONMENT, key_id).unwrap();
// Restore original key so that we don't leave RKPD with invalid blobs.
assert!(store_rkpd_attestation_key(&sec_level, &new_blob, &key.keyBlob).is_ok());
assert_eq!(new_key.keyBlob, new_blob);
}