diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-06-14 21:14:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-14 21:14:51 +0000 |
commit | 47e2366324a299e0a9b6d59d4df6d20bc328996b (patch) | |
tree | f2556a7939ed1f4e32f607cb4bffaa72b705b05b | |
parent | e7d20373d18372433cfde563bafec5e1c0804452 (diff) | |
parent | b4c231ec2415f4054ee63c049f8ae706becc627e (diff) | |
download | platform_cts-47e2366324a299e0a9b6d59d4df6d20bc328996b.tar.gz platform_cts-47e2366324a299e0a9b6d59d4df6d20bc328996b.tar.bz2 platform_cts-47e2366324a299e0a9b6d59d4df6d20bc328996b.zip |
Merge "[DO NOT MERGE] Do not require hardware-bound RSA key support on M devices" into marshmallow-cts-dev
-rw-r--r-- | tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java b/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java index caa6336cfe6..5a292523cb9 100644 --- a/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java +++ b/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java @@ -81,29 +81,10 @@ public class KeyChainTest extends AndroidTestCase { waiter.await(); } - /** - * Tests whether the required algorithms are backed by a Keymaster HAL that - * binds the key material to the specific device it was created or imported - * to. For more information on the Keymaster HAL, look at the header file at - * hardware/libhardware/include/hardware/keymaster.h and the associated - * tests in hardware/libhardware/tests/keymaster/ - */ public void testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported() throws Exception { - if (isLeanbackOnly()) { - KeyChain.isBoundKeyAlgorithm("RSA"); - } - else { - assertTrue("RSA must be hardware-backed by a hardware-specific Keymaster HAL", - KeyChain.isBoundKeyAlgorithm("RSA")); - } - - // These are not required, but must not throw an exception + // These are not required (until Nougat), but must not throw an exception + KeyChain.isBoundKeyAlgorithm("RSA"); KeyChain.isBoundKeyAlgorithm("DSA"); KeyChain.isBoundKeyAlgorithm("EC"); } - - private boolean isLeanbackOnly() { - PackageManager pm = getContext().getPackageManager(); - return (pm != null && pm.hasSystemFeature("android.software.leanback_only")); - } } |