summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-05 04:08:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-04-05 04:08:03 +0000
commitb8de283cb11786ebb4eaf7d8e88c2805a3bcfe13 (patch)
tree96b9d852d0ab881a4a275f18e2e85e85e6b70fcf
parentaa02c0f12606258382562673fb4157bb1c60f596 (diff)
parent729861aaf6e8d25052ed20604746c52d8248ed99 (diff)
downloadcts-b8de283cb11786ebb4eaf7d8e88c2805a3bcfe13.tar.gz
Merge "Snap for 8404905 from f39f9cbac36859597ba9a43b5b0191d560fd7814 to android11-tests-release" into android11-tests-release
-rw-r--r--hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/src/com/android/cts/authboundkey/AuthBoundKeyAppTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/src/com/android/cts/authboundkey/AuthBoundKeyAppTest.java b/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/src/com/android/cts/authboundkey/AuthBoundKeyAppTest.java
index 1f2adfd9562..6ef0d752b1d 100644
--- a/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/src/com/android/cts/authboundkey/AuthBoundKeyAppTest.java
+++ b/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/src/com/android/cts/authboundkey/AuthBoundKeyAppTest.java
@@ -74,11 +74,16 @@ public class AuthBoundKeyAppTest extends AndroidTestCase {
keyStore.load(null);
try {
SecretKey secretKey = (SecretKey) keyStore.getKey(KEY_NAME, null);
+ if(secretKey == null) {
+ // Correct behavior as we can also get a null key
+ return;
+ }
} catch (UnrecoverableKeyException e) {
// This is correct behavior
return;
}
- fail("Expected an UnrecoverableKeyException");
+
+ fail("Expected a null key");
}
}