Merge "Keystore 2.0 SPI: Small fix to apease CTS test." am: f246dc6346
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564074 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie1363de7ca5d2600cfa999627ead673752e43b91
This commit is contained in:
@@ -363,6 +363,11 @@ public class AndroidKeyStoreProvider extends Provider {
|
||||
}
|
||||
}
|
||||
|
||||
if (response.iSecurityLevel == null) {
|
||||
// This seems to be a pure certificate entry, nothing to return here.
|
||||
return null;
|
||||
}
|
||||
|
||||
Integer keymasterAlgorithm = null;
|
||||
// We just need one digest for the algorithm name
|
||||
int keymasterDigest = -1;
|
||||
|
||||
@@ -490,7 +490,7 @@ public class AndroidKeyStoreSpi extends KeyStoreSpi {
|
||||
int[] keymasterEncryptionPaddings =
|
||||
KeyProperties.EncryptionPadding.allToKeymaster(
|
||||
spec.getEncryptionPaddings());
|
||||
if (((spec.getPurposes() & KeyProperties.PURPOSE_DECRYPT) != 0)
|
||||
if (((spec.getPurposes() & KeyProperties.PURPOSE_ENCRYPT) != 0)
|
||||
&& (spec.isRandomizedEncryptionRequired())) {
|
||||
for (int keymasterPadding : keymasterEncryptionPaddings) {
|
||||
if (!KeymasterUtils
|
||||
|
||||
Reference in New Issue
Block a user