diff options
Diffstat (limited to 'java')
3 files changed, 6 insertions, 5 deletions
diff --git a/java/com/google/security/wycheproof/testcases/DhiesTest.java b/java/com/google/security/wycheproof/testcases/DhiesTest.java index 3e5bbe3..2a4815c 100644 --- a/java/com/google/security/wycheproof/testcases/DhiesTest.java +++ b/java/com/google/security/wycheproof/testcases/DhiesTest.java @@ -71,9 +71,9 @@ public class DhiesTest extends TestCase { } /** - * WARNING: This test uses weak crypto (i.e. DHIESWithAES), if supported. Checks that key agreement - * using DHIES works in the sense that it can decrypt what it encrypts. Unfortunately it seems that - * there is no secure mode using AES. + * WARNING: This test uses weak crypto (i.e. DHIESWithAES), if supported. Checks that key + * agreement using DHIES works in the sense that it can decrypt what it encrypts. Unfortunately it + * seems that there is no secure mode using AES. */ @SuppressWarnings("InsecureCryptoUsage") public void testDhiesBasic() throws Exception { diff --git a/java/com/google/security/wycheproof/testcases/DsaTest.java b/java/com/google/security/wycheproof/testcases/DsaTest.java index 0e94797..edfaa74 100644 --- a/java/com/google/security/wycheproof/testcases/DsaTest.java +++ b/java/com/google/security/wycheproof/testcases/DsaTest.java @@ -671,7 +671,7 @@ public class DsaTest extends TestCase { + "22e342be484c05763939601cd667", "300a090380fe01090380fe01", }; - + @SuppressWarnings("InsecureCryptoUsage") public void testVectors( String[] signatures, diff --git a/java/com/google/security/wycheproof/testcases/EciesTest.java b/java/com/google/security/wycheproof/testcases/EciesTest.java index e8b1fe1..bd29bf8 100644 --- a/java/com/google/security/wycheproof/testcases/EciesTest.java +++ b/java/com/google/security/wycheproof/testcases/EciesTest.java @@ -217,6 +217,7 @@ public class EciesTest extends TestCase { fail("This should not work"); } catch (GeneralSecurityException ex) { // This is as expected + // Bouncy Castle 1.56 throws this exception } catch (Exception ex) { fail("Expected subclass of java.security.GeneralSecurityException, but got: " + ex.getClass().getName()); @@ -284,7 +285,7 @@ public class EciesTest extends TestCase { byte[] message = "Hello".getBytes("UTF-8"); eciesA.init(Cipher.ENCRYPT_MODE, keyPair.getPublic()); byte[] ciphertext = eciesA.doFinal(message); - eciesB.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), eciesA.getParameters()); + eciesB.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), eciesB.getParameters()); byte[] decrypted = eciesB.doFinal(ciphertext); assertEquals(TestUtil.bytesToHex(message), TestUtil.bytesToHex(decrypted)); } |