Package org.bouncycastle.tls.test
Class TlsTestConfig
java.lang.Object
org.bouncycastle.tls.test.TlsTestConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Client will authenticate if it receives a certificate request, with an invalid certificatestatic final int
Client will authenticate if it receives a certificate request, with an invalid CertificateVerify signaturestatic final int
Client does not authenticate, ignores any certificate requeststatic final int
Client will authenticate if it receives a certificate requestint
Configures the client authentication behaviour of the test client.If not null, and TLS 1.2 or higher is negotiated, selects a fixed signature/hash algorithm to be used for the CertificateVerify signature (if one is sent).If not null, and TLS 1.2 or higher is negotiated, selects a fixed signature/hash algorithm to be _claimed_ in the CertificateVerify (if one is sent), independently of what was actually used.boolean
Control whether the client will callinvalid input: 'to check the server certificate chain.'
int
boolean
Configures whether the client will send an empty key_share extension in initial ClientHello.boolean
Configures whether the client will indicate version fallback via TLS_FALLBACK_SCSV.boolean
Configures whether a (TLS 1.2+) client may send the signature_algorithms extension in ClientHello.boolean
Configures whether a (TLS 1.2+) client may send the signature_algorithms_cert extension in ClientHello.Configures the supported protocol versions for the client.static final int
static final int
static final boolean
int
Configures the connection end at which a fatal alert is expected to be raised.short
Configures the type of fatal alert expected to be raised.static final int
Server will request a client certificate and receiving one is mandatorystatic final int
Server will not request a client certificatestatic final int
Server will request a client certificate but receiving one is optionalIf not null, and TLS 1.2 or higher is negotiated, selects a fixed signature/hash algorithm to be used for the ServerKeyExchange signature (if one is sent).int
Configures whether the test server will send a certificate request.If TLS 1.2 or higher is negotiated, configures the set of supported signature algorithms in the CertificateRequest (if one is sent).boolean
Control whether the server will callinvalid input: 'to check the client certificate chain.'
int
Configures a protocol version the server will unconditionally negotiate.Configures the supported protocol versions for the server. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
expectClientFatalAlert
(short alertDescription) void
expectServerFatalAlert
(short alertDescription)
-
Field Details
-
DEBUG
public static final boolean DEBUG- See Also:
-
CLIENT_AUTH_NONE
public static final int CLIENT_AUTH_NONEClient does not authenticate, ignores any certificate request- See Also:
-
CLIENT_AUTH_VALID
public static final int CLIENT_AUTH_VALIDClient will authenticate if it receives a certificate request- See Also:
-
CLIENT_AUTH_INVALID_CERT
public static final int CLIENT_AUTH_INVALID_CERTClient will authenticate if it receives a certificate request, with an invalid certificate- See Also:
-
CLIENT_AUTH_INVALID_VERIFY
public static final int CLIENT_AUTH_INVALID_VERIFYClient will authenticate if it receives a certificate request, with an invalid CertificateVerify signature- See Also:
-
CRYPTO_BC
public static final int CRYPTO_BC- See Also:
-
CRYPTO_JCA
public static final int CRYPTO_JCA- See Also:
-
SERVER_CERT_REQ_NONE
public static final int SERVER_CERT_REQ_NONEServer will not request a client certificate- See Also:
-
SERVER_CERT_REQ_OPTIONAL
public static final int SERVER_CERT_REQ_OPTIONALServer will request a client certificate but receiving one is optional- See Also:
-
SERVER_CERT_REQ_MANDATORY
public static final int SERVER_CERT_REQ_MANDATORYServer will request a client certificate and receiving one is mandatory- See Also:
-
clientAuth
public int clientAuthConfigures the client authentication behaviour of the test client. Use CLIENT_AUTH_* constants. -
clientAuthSigAlg
If not null, and TLS 1.2 or higher is negotiated, selects a fixed signature/hash algorithm to be used for the CertificateVerify signature (if one is sent). -
clientAuthSigAlgClaimed
If not null, and TLS 1.2 or higher is negotiated, selects a fixed signature/hash algorithm to be _claimed_ in the CertificateVerify (if one is sent), independently of what was actually used. -
clientCheckSigAlgOfServerCerts
public boolean clientCheckSigAlgOfServerCertsControl whether the client will callinvalid input: 'to check the server certificate chain.'
-
clientCrypto
public int clientCrypto -
clientFallback
public boolean clientFallbackConfigures whether the client will indicate version fallback via TLS_FALLBACK_SCSV. -
clientSendSignatureAlgorithms
public boolean clientSendSignatureAlgorithmsConfigures whether a (TLS 1.2+) client may send the signature_algorithms extension in ClientHello. -
clientSendSignatureAlgorithmsCert
public boolean clientSendSignatureAlgorithmsCertConfigures whether a (TLS 1.2+) client may send the signature_algorithms_cert extension in ClientHello. -
clientSupportedVersions
Configures the supported protocol versions for the client. If null, uses the library's default. -
serverAuthSigAlg
If not null, and TLS 1.2 or higher is negotiated, selects a fixed signature/hash algorithm to be used for the ServerKeyExchange signature (if one is sent). -
serverCertReq
public int serverCertReqConfigures whether the test server will send a certificate request. -
serverCertReqSigAlgs
If TLS 1.2 or higher is negotiated, configures the set of supported signature algorithms in the CertificateRequest (if one is sent). If null, uses a default set. -
serverCheckSigAlgOfClientCerts
public boolean serverCheckSigAlgOfClientCertsControl whether the server will callinvalid input: 'to check the client certificate chain.'
-
serverCrypto
public int serverCrypto -
serverNegotiateVersion
Configures a protocol version the server will unconditionally negotiate. Ignored if null. -
serverSupportedVersions
Configures the supported protocol versions for the server. If null, uses the library's default. -
expectFatalAlertConnectionEnd
public int expectFatalAlertConnectionEndConfigures the connection end at which a fatal alert is expected to be raised. Use ConnectionEnd.* constants. -
expectFatalAlertDescription
public short expectFatalAlertDescriptionConfigures the type of fatal alert expected to be raised. Use AlertDescription.* constants.
-
-
Constructor Details
-
TlsTestConfig
public TlsTestConfig()
-
-
Method Details
-
expectClientFatalAlert
public void expectClientFatalAlert(short alertDescription) -
expectServerFatalAlert
public void expectServerFatalAlert(short alertDescription)
-