Merge "Remove the hard-coded counterId in VaultParams" into pi-dev
This commit is contained in:
@@ -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(
|
||||
publicKey,
|
||||
counterId,
|
||||
|
||||
@@ -416,8 +416,8 @@ public class RecoverableKeyStoreManager {
|
||||
* @param vaultChallenge Challenge issued by vault service.
|
||||
* @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.
|
||||
* @deprecated Use {@link #startRecoverySessionWithCertPath(String, RecoveryCertPath, byte[],
|
||||
* byte[], List)} instead.
|
||||
* @deprecated Use {@link #startRecoverySessionWithCertPath(String, String, RecoveryCertPath,
|
||||
* byte[], byte[], List)} instead.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@@ -457,6 +457,7 @@ public class RecoverableKeyStoreManager {
|
||||
uid,
|
||||
new RecoverySessionStorage.Entry(sessionId, kfHash, keyClaimant, vaultParams));
|
||||
|
||||
Log.i(TAG, "Received VaultParams for recovery: " + HexDump.toHexString(vaultParams));
|
||||
try {
|
||||
byte[] thmKfHash = KeySyncUtils.calculateThmKfHash(kfHash);
|
||||
return KeySyncUtils.encryptRecoveryClaim(
|
||||
|
||||
@@ -296,7 +296,6 @@ public class KeySyncTaskTest {
|
||||
keyDerivationParams.getSalt(),
|
||||
TEST_CREDENTIAL);
|
||||
Long counterId = mRecoverableKeyStoreDb.getCounterId(TEST_USER_ID, TEST_RECOVERY_AGENT_UID);
|
||||
counterId = 1L; // TODO: use value from the database.
|
||||
assertThat(counterId).isNotNull();
|
||||
byte[] recoveryKey = decryptThmEncryptedKey(
|
||||
lockScreenHash,
|
||||
|
||||
Reference in New Issue
Block a user