OSDN Git Service

Add PlatformKeyManager helper for RecoverableKeyStoreLoader
authorRobert Berry <robertberry@google.com>
Mon, 11 Dec 2017 14:34:29 +0000 (14:34 +0000)
committerRobert Berry <robertberry@google.com>
Mon, 18 Dec 2017 23:25:33 +0000 (23:25 +0000)
commita9fae14c3345aa91721dfbb54dee8d7572a81ba8
treeb429eaa763c6c788bec02db5988e97f823085c3a
parent112d5f09ce2c72262f5fc6ea4563f6495f2fb56c
Add PlatformKeyManager helper for RecoverableKeyStoreLoader

Manages generating the platform key and then loading it into AndroidKeyStore
with different permissions for 'decrypt' and 'encrypt'. Encrypt should be always
available, so as to enable us to generate application keys at any time, and be
able to sync them wrapped with the platform key to disk. Decrypt should only be
available shortly after a screen unlock - i.e., so that we can unwrap the keys
persisted to disk, then rewrap them with the recovery key and sync them to the
remote storage.

Test: adb shell am instrument -w -e package com.android.server.locksettings.recoverablekeystore com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I7575ea1c3c78d5544ef763324ac47dffb3993b55
services/core/java/com/android/server/locksettings/recoverablekeystore/InsecureUserException.java [new file with mode: 0644]
services/core/java/com/android/server/locksettings/recoverablekeystore/KeyStoreProxy.java [new file with mode: 0644]
services/core/java/com/android/server/locksettings/recoverablekeystore/KeyStoreProxyImpl.java [new file with mode: 0644]
services/core/java/com/android/server/locksettings/recoverablekeystore/PlatformKeyManager.java [new file with mode: 0644]
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java [new file with mode: 0644]