From 82033fa109019cc0dbae40df5d4b608e28aae223 Mon Sep 17 00:00:00 2001 From: Prashant Patil Date: Thu, 15 Dec 2022 14:46:44 +0000 Subject: Keystore: Added missing assumption statement A missing statement of assumption of strongbox is added in RsaOaepTest#testRsaOaep2048Sha1Mgf1Sha1_StrongBox test. Bug: 262706454 Test: atest CtsKeystoreWycheproofTestCases: com.google.security.wycheproof.RsaOaepTest#testRsaOaep2048Sha1Mgf1Sha1_StrongBox Change-Id: I0d24514b7d60394ef5212017e71dcaa5096be06d --- .../com/google/security/wycheproof/testcases/RsaOaepTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java b/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java index 9d9e911..39a3b0a 100644 --- a/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java +++ b/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java @@ -255,6 +255,9 @@ public class RsaOaepTest { public void testOaep(String filename, boolean allowSkippingKeys, boolean isStrongBox) throws Exception { + if (isStrongBox) { + KeyStoreUtil.assumeStrongBox(); + } JsonObject test = JsonUtil.getTestVectors(this.getClass(), filename); // Compares the expected and actual JSON schema of the test vector file. @@ -360,7 +363,7 @@ public class RsaOaepTest { @Test public void testRsaOaep2048Sha1Mgf1Sha1_StrongBox() throws Exception { - testOaep("rsa_oaep_2048_sha1_mgf1sha1_test.json", true); + testOaep("rsa_oaep_2048_sha1_mgf1sha1_test.json", true, true); } @Test @@ -379,7 +382,6 @@ public class RsaOaepTest { } @Test public void testRsaOaep2048Sha256Mgf1Sha1_StrongBox() throws Exception { - KeyStoreUtil.assumeStrongBox(); testOaep("rsa_oaep_2048_sha256_mgf1sha1_test.json", false, true); } @@ -389,7 +391,6 @@ public class RsaOaepTest { } @Test public void testRsaOaep2048Sha256Mgf1Sha256_StrongBox() throws Exception { - KeyStoreUtil.assumeStrongBox(); testOaep("rsa_oaep_2048_sha256_mgf1sha256_test.json", false, true); } @@ -459,7 +460,6 @@ public class RsaOaepTest { } @Test public void testRsaOaepMisc_StrongBox() throws Exception { - KeyStoreUtil.assumeStrongBox(); testOaep("rsa_oaep_misc_test.json", false, true); } } -- cgit v1.2.3