aboutsummaryrefslogtreecommitdiff
path: root/java/com/google/security/wycheproof/testcases/EciesTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/google/security/wycheproof/testcases/EciesTest.java')
-rw-r--r--java/com/google/security/wycheproof/testcases/EciesTest.java3
1 files changed, 2 insertions, 1 deletions
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));
}