File tree 2 files changed +10
-7
lines changed
core/src/test/java/org/bouncycastle/crypto/test
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ public static void main(String[] args)
34
34
35
35
public void performTest () throws Exception
36
36
{
37
+ basicSigTest ();
38
+
37
39
for (int i = 0 ; i < 10 ; ++i )
38
40
{
39
41
testConsistency (Ed25519 .Algorithm .Ed25519 , null );
@@ -43,7 +45,6 @@ public void performTest() throws Exception
43
45
testConsistency (Ed25519 .Algorithm .Ed25519ph , context );
44
46
}
45
47
46
- basicSigTest ();
47
48
testRegressionInfiniteLoop ();
48
49
}
49
50
@@ -837,9 +838,9 @@ private void testRegressionInfiniteLoop() throws Exception
837
838
838
839
signer .init (false , pub );
839
840
signer .update (msg , 0 , msg .length );
840
- if (! signer .verifySignature (sig )) {
841
- fail ( "signature verification failed for test vector: " + error );
842
- }
841
+ boolean shouldVerify = signer .verifySignature (sig );
842
+
843
+ isTrue ( "signature verification failed for test vector: " + error , shouldVerify );
843
844
}
844
845
}
845
846
}
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ public void performTest() throws Exception
41
41
testConsistency(Ed448.Algorithm.Ed448, context);
42
42
testConsistency(Ed448.Algorithm.Ed448ph, context);
43
43
}
44
+
45
+ testRegressionInfiniteLoop();
44
46
}
45
47
46
48
private void basicSigTest()
@@ -1234,9 +1236,9 @@ private void testRegressionInfiniteLoop() throws Exception
1234
1236
1235
1237
signer.init(false, pub);
1236
1238
signer.update(msg, 0, msg.length);
1237
- if (! signer.verifySignature(sig)) {
1238
- fail("signature verification failed for test vector: " + error);
1239
- }
1239
+ boolean shouldVerify = signer.verifySignature(sig);
1240
+
1241
+ isTrue("signature verification failed for test vector: " + error, shouldVerify);
1240
1242
}
1241
1243
}
1242
1244
}
You can’t perform that action at this time.
0 commit comments