Top Fields Constructors Methods
org.bouncycastle.tls

public Class DefaultTlsDHConfigVerifier

extends Object
implements TlsDHConfigVerifier
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.TlsDHConfigVerifier
Known Direct Subclasses
org.bouncycastle.jsse.provider.ProvDHConfigVerifier
Imports
java.math.BigInteger, java.util.Vector, org.bouncycastle.tls.crypto.DHGroup, .DHStandardGroups, .TlsDHConfig

Field Summary

Modifier and TypeField and Description
protected static final Vector<E>
public static final int
protected Vector<E>
protected int

Constructor Summary

AccessConstructor and Description
public
DefaultTlsDHConfigVerifier()

Accept named groups and various standard DH groups with 'P' at least DEFAULT_MINIMUM_PRIME_BITS bits.

public
DefaultTlsDHConfigVerifier(int minimumPrimeBits)

Accept named groups and various standard DH groups with 'P' at least the specified number of bits.

public
DefaultTlsDHConfigVerifier(Vector<E>
a Vector of acceptable DHGroups.
groups
,
int minimumPrimeBits)

Accept named groups and a custom set of group parameters, subject to a minimum bitlength for 'P'.

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(TlsDHConfig
the TlsDHConfig to check
dhConfig
)

Implements org.bouncycastle.tls.TlsDHConfigVerifier.accept.

Check whether the given DH configuration is acceptable for use.
private static void
protected boolean
protected boolean
protected boolean
protected boolean
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_GROUPSback to summary
protected static final Vector<E> DEFAULT_GROUPS
DEFAULT_MINIMUM_PRIME_BITSback to summary
public static final int DEFAULT_MINIMUM_PRIME_BITS
groupsback to summary
protected Vector<E> groups
minimumPrimeBitsback to summary
protected int minimumPrimeBits

Constructor Detail

DefaultTlsDHConfigVerifierback to summary
public DefaultTlsDHConfigVerifier()

Accept named groups and various standard DH groups with 'P' at least DEFAULT_MINIMUM_PRIME_BITS bits.

DefaultTlsDHConfigVerifierback to summary
public DefaultTlsDHConfigVerifier(int minimumPrimeBits)

Accept named groups and various standard DH groups with 'P' at least the specified number of bits.

DefaultTlsDHConfigVerifierback to summary
public DefaultTlsDHConfigVerifier(Vector<E> groups, int minimumPrimeBits)

Accept named groups and a custom set of group parameters, subject to a minimum bitlength for 'P'.

Parameters
groups:Vector<E>

a Vector of acceptable DHGroups.

Method Detail

acceptback to summary
public boolean accept(TlsDHConfig dhConfig)

Implements org.bouncycastle.tls.TlsDHConfigVerifier.accept.

Doc from org.bouncycastle.tls.TlsDHConfigVerifier.accept.

Check whether the given DH configuration is acceptable for use.

Parameters
dhConfig:TlsDHConfig

the TlsDHConfig to check

Returns:boolean

true if (and only if) the specified configuration is acceptable

addDefaultGroupback to summary
private static void addDefaultGroup(DHGroup dhGroup)
areGroupsEqualback to summary
protected boolean areGroupsEqual(DHGroup a, DHGroup b)
areParametersEqualback to summary
protected boolean areParametersEqual(BigInteger a, BigInteger b)
checkGroupback to summary
protected boolean checkGroup(TlsDHConfig dhConfig)
checkMinimumPrimeBitsback to summary
protected boolean checkMinimumPrimeBits(TlsDHConfig dhConfig)
getMinimumPrimeBitsback to summary
public int getMinimumPrimeBits()