OSDN Git Service

Add platform key generation ID to WrappedKey instances
authorRobert Berry <robertberry@google.com>
Thu, 14 Dec 2017 17:04:07 +0000 (17:04 +0000)
committerRobert Berry <robertberry@google.com>
Sat, 16 Dec 2017 23:33:10 +0000 (23:33 +0000)
commit9fa18c621e82d4a6e2b647fc3268ddc89e64b73c
tree3bfc7668a2a176c27063a4fd37be5138b651cb94
parent13dbdde43d59cc497b18be755945d3881422fff3
Add platform key generation ID to WrappedKey instances

This is so that when we persist them, we can tell that they were wrapped
with a specific version of the platform key. This will be useful for us
to provide error messages to the users of recoverable keys. (i.e., in
the case where the user had an application key that was wrapped with a
platform key that is no longer valid, they MUST rotate key.)

Test: adb shell am instrument -w -e package com.android.server.locksettings.recoverablekeystore com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I91569bcaf23b49d89a9caa9d313d9c93952b620d
services/core/java/com/android/server/locksettings/recoverablekeystore/PlatformEncryptionKey.java [new file with mode: 0644]
services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGenerator.java
services/core/java/com/android/server/locksettings/recoverablekeystore/WrappedKey.java
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGeneratorTest.java
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/WrappedKeyTest.java