Correct the keystore alias used for secure imports
An Android-O timeframe refactor removed all use of keystore "skey" aliases. Creating one not only partially reverses that refactor, but it also results in a key alias which cannot be deleted in some cases, causing AndroidKeyStoreTest failures during the second run of CTS. Bug: 80228327 Test: CTS tests ImportWrappedKeyTest and AndroidKeyStoreTest, in that order Change-Id: I348ba421f29cdf6c65fc98be3a25d19938d559c1
This commit is contained in:
@@ -811,7 +811,7 @@ public class AndroidKeyStoreSpi extends KeyStoreSpi {
|
||||
}
|
||||
|
||||
int errorCode = mKeyStore.importWrappedKey(
|
||||
Credentials.USER_SECRET_KEY + alias,
|
||||
Credentials.USER_PRIVATE_KEY + alias,
|
||||
entry.getWrappedKeyBytes(),
|
||||
Credentials.USER_PRIVATE_KEY + entry.getWrappingKeyAlias(),
|
||||
maskingKey,
|
||||
|
||||
Reference in New Issue
Block a user