Skip to content

Commit d709e2f

Browse files
committed
Factor out testDHExplicit
1 parent b5126f4 commit d709e2f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tls/src/test/java/org/bouncycastle/tls/crypto/test/TlsCryptoTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,14 @@ public void testDHDomain() throws Exception
221221
implTestDHDomain(new TlsDHConfig(namedGroup, false));
222222
implTestDHDomain(new TlsDHConfig(namedGroup, true));
223223
}
224+
}
225+
226+
public void testDHExplicit() throws Exception
227+
{
228+
if (!crypto.hasDHAgreement())
229+
{
230+
return;
231+
}
224232

225233
new DefaultTlsDHGroupVerifier()
226234
{{
@@ -236,9 +244,10 @@ public void testDHDomain() throws Exception
236244
assertSame(dhGroup, TlsDHUtils.getStandardGroupForDHParameters(p, g));
237245

238246
int namedGroup = TlsDHUtils.getNamedGroupForDHParameters(p, g);
247+
248+
// Named groups tested elsewhere
239249
if (NamedGroup.refersToASpecificFiniteField(namedGroup))
240250
{
241-
// Already tested the named groups
242251
continue;
243252
}
244253

0 commit comments

Comments
 (0)