aboutsummaryrefslogtreecommitdiff
path: root/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java')
-rw-r--r--keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java15
1 files changed, 12 insertions, 3 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 29f8905..0a82423 100644
--- a/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java
+++ b/keystore-cts/java/com/google/security/wycheproof/testcases/RsaOaepTest.java
@@ -196,10 +196,13 @@ public class RsaOaepTest {
String sha = getString(group, "sha");
String mgf = getString(group, "mgf");
String mgfSha = getString(group, "mgfSha");
- // mgfDigest other than SHA-1 are supported from KeyMint V1 and above.
+ // mgfDigest other than SHA-1 are supported from KeyMint V1 and above but some implementations
+ // of keymint V1 and V2 (notably the C++ reference implementation) does not include MGF_DIGEST
+ // tag in key characteriestics hence issue b/287532460 introduced. So non-default MGF_DIGEST is
+ // tested on Keymint V3 and above.
if (!mgfSha.equalsIgnoreCase("SHA-1")) {
- assumeTrue("This test is valid for KeyMint version 1 and above.",
- KeyStoreUtil.getFeatureVersionKeystore(isStrongBox) >= KeyStoreUtil.KM_VERSION_KEYMINT_1);
+ assumeTrue("This test is valid for KeyMint version 3 and above.",
+ KeyStoreUtil.getFeatureVersionKeystore(isStrongBox) >= KeyStoreUtil.KM_VERSION_KEYMINT_3);
}
PSource p = PSource.PSpecified.DEFAULT;
if (test.has("label") && !TextUtils.isEmpty(getString(test, "label"))) {
@@ -362,6 +365,8 @@ public class RsaOaepTest {
@Test
public void testRsaOaep2048Sha1Mgf1Sha1() throws Exception {
+ // b/244609904#comment64
+ KeyStoreUtil.assumeKeyMintV1OrNewer(false);
testOaep("rsa_oaep_2048_sha1_mgf1sha1_test.json", false);
}
@@ -420,6 +425,8 @@ public class RsaOaepTest {
@Test
public void testRsaOaep3072Sha256Mgf1Sha1() throws Exception {
+ // b/244609904#comment64
+ KeyStoreUtil.assumeKeyMintV1OrNewer(false);
testOaep("rsa_oaep_3072_sha256_mgf1sha1_test.json", false);
}
@@ -440,6 +447,8 @@ public class RsaOaepTest {
@Test
public void testRsaOaep4096Sha256Mgf1Sha1() throws Exception {
+ // b/244609904#comment64
+ KeyStoreUtil.assumeKeyMintV1OrNewer(false);
testOaep("rsa_oaep_4096_sha256_mgf1sha1_test.json", false);
}