Package org.bouncycastle.tls
Class DefaultTlsDHGroupVerifier
java.lang.Object
org.bouncycastle.tls.DefaultTlsDHGroupVerifier
- All Implemented Interfaces:
TlsDHGroupVerifier
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAccept named groups and various standard DH groups with 'P' at leastDEFAULT_MINIMUM_PRIME_BITS
bits.DefaultTlsDHGroupVerifier
(int minimumPrimeBits) Accept named groups and various standard DH groups with 'P' at least the specified number of bits.DefaultTlsDHGroupVerifier
(Vector groups, int minimumPrimeBits) Accept named groups and a custom set of group parameters, subject to a minimum bitlength for 'P'. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether the given DH group is acceptable for use.protected boolean
areGroupsEqual
(DHGroup a, DHGroup b) protected boolean
protected boolean
checkGroup
(DHGroup dhGroup) protected boolean
checkMinimumPrimeBits
(DHGroup dhGroup) int
-
Field Details
-
DEFAULT_MINIMUM_PRIME_BITS
public static final int DEFAULT_MINIMUM_PRIME_BITS- See Also:
-
groups
-
minimumPrimeBits
protected int minimumPrimeBits
-
-
Constructor Details
-
DefaultTlsDHGroupVerifier
public DefaultTlsDHGroupVerifier()Accept named groups and various standard DH groups with 'P' at leastDEFAULT_MINIMUM_PRIME_BITS
bits. -
DefaultTlsDHGroupVerifier
public DefaultTlsDHGroupVerifier(int minimumPrimeBits) Accept named groups and various standard DH groups with 'P' at least the specified number of bits. -
DefaultTlsDHGroupVerifier
Accept named groups and a custom set of group parameters, subject to a minimum bitlength for 'P'.
-
-
Method Details
-
accept
Description copied from interface:TlsDHGroupVerifier
Check whether the given DH group is acceptable for use.- Specified by:
accept
in interfaceTlsDHGroupVerifier
- Parameters:
dhGroup
- theDHGroup
to check- Returns:
- true if (and only if) the specified group is acceptable
-
getMinimumPrimeBits
public int getMinimumPrimeBits() -
areGroupsEqual
-
areParametersEqual
-
checkGroup
-
checkMinimumPrimeBits
-