diff options
author | Annie Meng <anniemeng@google.com> | 2019-02-07 15:30:42 +0000 |
---|---|---|
committer | Annie Meng <anniemeng@google.com> | 2019-02-08 13:57:20 +0000 |
commit | f5beb598a392f031f3c44ad082dbce84550ca802 (patch) | |
tree | eea6c5b3034b683d9a8c5af321fa5dafb8863f75 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp | |
parent | de626e0520cff86f09e0d009221c40a41c77732d (diff) |
Set correct SID when generating a platform key
Previously, the key was bound to the user's id instead of its SID.
Also adds ag/6288390 which detects and regenerates existing invalid keys.
In general, this change:
1) Is backwards compatible for the primary user with existing keys (no
change in key creation as SID set to 0 = uses primary user's SID).
2) Is compatible for all new keys created in all users going forward.
3) Handles existing invalid keys in non-primary users by force
regenerating a new valid key upon next use.
TODO for a future CL: Handle SID == 0 case better (b/124095438).
Bug: 123213054
Test: 1) atest FrameworksServicesTests:com.android.server.locksettings.recoverablekeystore
2) atest -m RecoveryControllerHostTest RecoverableKeyStoreEndtoEndHostTest
RecoverySessionHostTest
3) Manual tests:
* Primary user's backwards compatibility -> generate key without change,
flash new change, key continues to work; generate new key by re-enabling backup,
new key created and encrypted backup succeeds.
* Add work profile with new screen lock -> key generated and encrypted
backup succeeds.
* Add work profile and use existing screen lock -> key generated and
encrypted backup succeeds.
* Add work profile and perform encrypted backup before change (invalid
key generated) -> flash new change, invalid key detected and new valid
key generated.
Change-Id: I27b4bde3298a6b1c5373317af807bf7700f73768
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions