diff options
author | Rubin Xu <rubinxu@google.com> | 2019-12-24 13:35:02 +0000 |
---|---|---|
committer | Rubin Xu <rubinxu@google.com> | 2020-01-14 17:10:18 +0000 |
commit | b3a13e1e2ceb8ed7d607a5fc146a799438bfa52e (patch) | |
tree | 4ff2cc4203b10c6eb4052730dc523edc294705dc /keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java | |
parent | d69517ebf1b4684988fcf719fa59c650ca412d53 (diff) |
Add KeyGenParameterSpec.setCriticalToDeviceEncryption
Mirror KeyProtection.setCriticalToDeviceEncryption so
the flag can also be set on keys generated by keystore.
Bug: 72178550
Test: atest android.security.keystore.KeyGenParameterSpecTest
Test: atest android.security.ParcelableKeyGenParameterSpecTest
Change-Id: I7f102c82e60f211028c694d499ffd2838b89bb2b
Diffstat (limited to 'keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java')
-rw-r--r-- | keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java b/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java index fca2775a34bb..b7d72fce6eba 100644 --- a/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java +++ b/keystore/tests/src/android/security/ParcelableKeyGenParameterSpecTest.java @@ -84,6 +84,7 @@ public final class ParcelableKeyGenParameterSpecTest { .setIsStrongBoxBacked(true) .setUserConfirmationRequired(true) .setUnlockedDeviceRequired(true) + .setCriticalToDeviceEncryption(true) .build(); } @@ -115,6 +116,7 @@ public final class ParcelableKeyGenParameterSpecTest { assertThat(spec.isStrongBoxBacked(), is(true)); assertThat(spec.isUserConfirmationRequired(), is(true)); assertThat(spec.isUnlockedDeviceRequired(), is(true)); + assertThat(spec.isCriticalToDeviceEncryption(), is(true)); } private Parcel parcelForReading(ParcelableKeyGenParameterSpec spec) { |