Skip to content

Commit 5ad359f

Browse files
committed
Fix test to check for correct Exception
1 parent a3a43ab commit 5ad359f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/net/i2p/crypto/eddsa/EdDSAEngineTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.security.PrivateKey;
99
import java.security.PublicKey;
1010
import java.security.Signature;
11+
import java.security.SignatureException;
1112

1213
import net.i2p.crypto.eddsa.spec.EdDSANamedCurveTable;
1314
import net.i2p.crypto.eddsa.spec.EdDSAParameterSpec;
@@ -82,7 +83,7 @@ public void testVerifyWrongSigLength() throws Exception {
8283
byte[] message = "This is a secret message".getBytes(Charset.forName("UTF-8"));
8384
sgr.update(message);
8485

85-
exception.expect(IllegalArgumentException.class);
86+
exception.expect(SignatureException.class);
8687
exception.expectMessage("signature length is wrong");
8788
sgr.verify(new byte[] {0});
8889
}

0 commit comments

Comments
 (0)