Loading services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java +0 −3 Original line number Original line Diff line number Diff line Loading @@ -255,9 +255,6 @@ public class KeySyncTask implements Runnable { } } } } // TODO: make sure the same counter id is used during recovery and remove temporary fix. counterId = 1L; byte[] vaultParams = KeySyncUtils.packVaultParams( byte[] vaultParams = KeySyncUtils.packVaultParams( publicKey, publicKey, counterId, counterId, Loading services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -416,8 +416,8 @@ public class RecoverableKeyStoreManager { * @param vaultChallenge Challenge issued by vault service. * @param vaultChallenge Challenge issued by vault service. * @param secrets Lock-screen hashes. For now only a single secret is supported. * @param secrets Lock-screen hashes. For now only a single secret is supported. * @return Encrypted bytes of recovery claim. This can then be issued to the vault service. * @return Encrypted bytes of recovery claim. This can then be issued to the vault service. * @deprecated Use {@link #startRecoverySessionWithCertPath(String, RecoveryCertPath, byte[], * @deprecated Use {@link #startRecoverySessionWithCertPath(String, String, RecoveryCertPath, * byte[], List)} instead. * byte[], byte[], List)} instead. * * * @hide * @hide */ */ Loading Loading @@ -457,6 +457,7 @@ public class RecoverableKeyStoreManager { uid, uid, new RecoverySessionStorage.Entry(sessionId, kfHash, keyClaimant, vaultParams)); new RecoverySessionStorage.Entry(sessionId, kfHash, keyClaimant, vaultParams)); Log.i(TAG, "Received VaultParams for recovery: " + HexDump.toHexString(vaultParams)); try { try { byte[] thmKfHash = KeySyncUtils.calculateThmKfHash(kfHash); byte[] thmKfHash = KeySyncUtils.calculateThmKfHash(kfHash); return KeySyncUtils.encryptRecoveryClaim( return KeySyncUtils.encryptRecoveryClaim( Loading services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -296,7 +296,6 @@ public class KeySyncTaskTest { keyDerivationParams.getSalt(), keyDerivationParams.getSalt(), TEST_CREDENTIAL); TEST_CREDENTIAL); Long counterId = mRecoverableKeyStoreDb.getCounterId(TEST_USER_ID, TEST_RECOVERY_AGENT_UID); Long counterId = mRecoverableKeyStoreDb.getCounterId(TEST_USER_ID, TEST_RECOVERY_AGENT_UID); counterId = 1L; // TODO: use value from the database. assertThat(counterId).isNotNull(); assertThat(counterId).isNotNull(); byte[] recoveryKey = decryptThmEncryptedKey( byte[] recoveryKey = decryptThmEncryptedKey( lockScreenHash, lockScreenHash, Loading Loading
services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java +0 −3 Original line number Original line Diff line number Diff line Loading @@ -255,9 +255,6 @@ public class KeySyncTask implements Runnable { } } } } // TODO: make sure the same counter id is used during recovery and remove temporary fix. counterId = 1L; byte[] vaultParams = KeySyncUtils.packVaultParams( byte[] vaultParams = KeySyncUtils.packVaultParams( publicKey, publicKey, counterId, counterId, Loading
services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -416,8 +416,8 @@ public class RecoverableKeyStoreManager { * @param vaultChallenge Challenge issued by vault service. * @param vaultChallenge Challenge issued by vault service. * @param secrets Lock-screen hashes. For now only a single secret is supported. * @param secrets Lock-screen hashes. For now only a single secret is supported. * @return Encrypted bytes of recovery claim. This can then be issued to the vault service. * @return Encrypted bytes of recovery claim. This can then be issued to the vault service. * @deprecated Use {@link #startRecoverySessionWithCertPath(String, RecoveryCertPath, byte[], * @deprecated Use {@link #startRecoverySessionWithCertPath(String, String, RecoveryCertPath, * byte[], List)} instead. * byte[], byte[], List)} instead. * * * @hide * @hide */ */ Loading Loading @@ -457,6 +457,7 @@ public class RecoverableKeyStoreManager { uid, uid, new RecoverySessionStorage.Entry(sessionId, kfHash, keyClaimant, vaultParams)); new RecoverySessionStorage.Entry(sessionId, kfHash, keyClaimant, vaultParams)); Log.i(TAG, "Received VaultParams for recovery: " + HexDump.toHexString(vaultParams)); try { try { byte[] thmKfHash = KeySyncUtils.calculateThmKfHash(kfHash); byte[] thmKfHash = KeySyncUtils.calculateThmKfHash(kfHash); return KeySyncUtils.encryptRecoveryClaim( return KeySyncUtils.encryptRecoveryClaim( Loading
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -296,7 +296,6 @@ public class KeySyncTaskTest { keyDerivationParams.getSalt(), keyDerivationParams.getSalt(), TEST_CREDENTIAL); TEST_CREDENTIAL); Long counterId = mRecoverableKeyStoreDb.getCounterId(TEST_USER_ID, TEST_RECOVERY_AGENT_UID); Long counterId = mRecoverableKeyStoreDb.getCounterId(TEST_USER_ID, TEST_RECOVERY_AGENT_UID); counterId = 1L; // TODO: use value from the database. assertThat(counterId).isNotNull(); assertThat(counterId).isNotNull(); byte[] recoveryKey = decryptThmEncryptedKey( byte[] recoveryKey = decryptThmEncryptedKey( lockScreenHash, lockScreenHash, Loading