/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
D | RecoverableKeyStoreDbTest.java | 57 private RecoverableKeyStoreDb mRecoverableKeyStoreDb; field in RecoverableKeyStoreDbTest 70 mRecoverableKeyStoreDb = RecoverableKeyStoreDb.newInstance(context); in setUp() 75 mRecoverableKeyStoreDb.close(); in tearDown() 90 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey() 92 WrappedKey retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey() 103 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey() 105 retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey() 127 mRecoverableKeyStoreDb.insertKey(userId, /*uid=*/ 1, alias, key1); in insertKey_allowsTwoUidsToHaveSameAlias() 128 mRecoverableKeyStoreDb.insertKey(userId, /*uid=*/ 2, alias, key2); in insertKey_allowsTwoUidsToHaveSameAlias() 132 mRecoverableKeyStoreDb.getKey(1, alias).getNonce()); in insertKey_allowsTwoUidsToHaveSameAlias() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | KeySyncTaskTest.java | 110 private RecoverableKeyStoreDb mRecoverableKeyStoreDb; field in KeySyncTaskTest 123 mRecoverableKeyStoreDb = RecoverableKeyStoreDb.newInstance(context); in setUp() 125 mRecoverableKeyStoreDb.setRecoverySecretTypes(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, in setUp() 127 mRecoverableKeyStoreDb.setRecoverySecretTypes(TEST_USER_ID, TEST_RECOVERY_AGENT_UID2, in setUp() 130 mRecoverableKeyStoreDb.setActiveRootOfTrust(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, in setUp() 132 mRecoverableKeyStoreDb.setActiveRootOfTrust(TEST_USER_ID, TEST_RECOVERY_AGENT_UID2, in setUp() 137 mRecoverableKeyStoreDb, in setUp() 156 mRecoverableKeyStoreDb.close(); in tearDown() 257 mRecoverableKeyStoreDb.setPlatformKeyGenerationId(TEST_USER_ID, TEST_GENERATION_ID); in run_doesNotSendAnythingIfNoRecoveryAgentSet() 258 mRecoverableKeyStoreDb.insertKey( in run_doesNotSendAnythingIfNoRecoveryAgentSet() [all …]
|
D | RecoverableKeyStoreManagerTest.java | 163 private RecoverableKeyStoreDb mRecoverableKeyStoreDb; field in RecoverableKeyStoreManagerTest 176 mRecoverableKeyStoreDb = RecoverableKeyStoreDb.newInstance(context); in setUp() 191 mRecoverableKeyStoreDb, in setUp() 204 mRecoverableKeyStoreDb.close(); in tearDown() 216 assertThat(mRecoverableKeyStoreDb.getKey(uid, TEST_ALIAS)).isNotNull(); in importKey_storesTheKey() 217 assertThat(mRecoverableKeyStoreDb.getShouldCreateSnapshot(userId, uid)).isTrue(); in importKey_storesTheKey() 250 assertThat(mRecoverableKeyStoreDb.getKey(uid, TEST_ALIAS)).isNotNull(); in importKeyWithMetadata_nullMetadata_storesTheKey() 251 assertThat(mRecoverableKeyStoreDb.getShouldCreateSnapshot(userId, uid)).isTrue(); in importKeyWithMetadata_nullMetadata_storesTheKey() 263 assertThat(mRecoverableKeyStoreDb.getKey(uid, TEST_ALIAS)).isNotNull(); in importKeyWithMetadata_nonNullMetadata_storesTheKey() 264 assertThat(mRecoverableKeyStoreDb.getShouldCreateSnapshot(userId, uid)).isTrue(); in importKeyWithMetadata_nonNullMetadata_storesTheKey() [all …]
|
D | RecoverableKeyGeneratorTest.java | 70 private RecoverableKeyStoreDb mRecoverableKeyStoreDb; field in RecoverableKeyGeneratorTest 78 mRecoverableKeyStoreDb = RecoverableKeyStoreDb.newInstance(context); in setUp() 83 mRecoverableKeyGenerator = RecoverableKeyGenerator.newInstance(mRecoverableKeyStoreDb); in setUp() 92 mRecoverableKeyStoreDb.close(); in tearDown() 101 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nullMetadata() 111 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nonNullMetadata() 129 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 143 assertNull(mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS).getKeyMetadata()); in importKey_storesNullMetadata() 153 mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS).getKeyMetadata()); in importKey_storesNonNullMetadata() 163 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in importKey_storesTheWrappedVersionOfTheRawMaterial()
|
D | PlatformKeyManagerTest.java | 85 private RecoverableKeyStoreDb mRecoverableKeyStoreDb; field in PlatformKeyManagerTest 96 mRecoverableKeyStoreDb = RecoverableKeyStoreDb.newInstance(context); in setUp() 98 mContext, mKeyStoreProxy, mRecoverableKeyStoreDb, mGateKeeperService); in setUp() 108 mRecoverableKeyStoreDb.close(); in tearDown() 255 mRecoverableKeyStoreDb.getPlatformKeyGenerationId(USER_ID_FIXTURE)); in init_savesGenerationIdToDatabase()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | KeySyncTask.java | 85 private final RecoverableKeyStoreDb mRecoverableKeyStoreDb; field in KeySyncTask 143 mRecoverableKeyStoreDb = recoverableKeyStoreDb; in KeySyncTask() 176 mRecoverableKeyStoreDb.invalidateKeysForUserIdOnCustomScreenLock(mUserId); in syncKeys() 180 List<Integer> recoveryAgents = mRecoverableKeyStoreDb.getRecoveryAgents(mUserId); in syncKeys() 203 (mRecoverableKeyStoreDb.getSnapshotVersion(mUserId, recoveryAgentUid) != null) in syncKeysForAgent() 214 mRecoverableKeyStoreDb.getActiveRootOfTrust(mUserId, recoveryAgentUid); in syncKeysForAgent() 219 CertPath certPath = mRecoverableKeyStoreDb.getRecoveryServiceCertPath(mUserId, in syncKeysForAgent() 226 publicKey = mRecoverableKeyStoreDb.getRecoveryServicePublicKey(mUserId, in syncKeysForAgent() 234 byte[] vaultHandle = mRecoverableKeyStoreDb.getServerParams(mUserId, recoveryAgentUid); in syncKeysForAgent() 312 counterId = mRecoverableKeyStoreDb.getCounterId(mUserId, recoveryAgentUid); in syncKeysForAgent() [all …]
|