Package org.bouncycastle.tls.test
Class TlsTestConfig
- java.lang.Object
-
- org.bouncycastle.tls.test.TlsTestConfig
-
public class TlsTestConfig extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intCLIENT_AUTH_INVALID_CERTClient will authenticate if it receives a certificate request, with an invalid certificatestatic intCLIENT_AUTH_INVALID_VERIFYClient will authenticate if it receives a certificate request, with an invalid CertificateVerify signaturestatic intCLIENT_AUTH_NONEClient does not authenticate, ignores any certificate requeststatic intCLIENT_AUTH_VALIDClient will authenticate if it receives a certificate requestintclientAuthConfigures the client authentication behaviour of the test client.SignatureAndHashAlgorithmclientAuthSigAlgIf 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).SignatureAndHashAlgorithmclientAuthSigAlgClaimedIf 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.booleanclientCheckSigAlgOfServerCertsControl the result the client will return fromTlsPeer.shouldCheckSigAlgOfPeerCerts().intclientCryptobooleanclientEmptyKeyShareConfigures whether the client will send an empty key_share extension in initial ClientHello.booleanclientFallbackConfigures whether the client will indicate version fallback via TLS_FALLBACK_SCSV.booleanclientSendSignatureAlgorithmsConfigures whether a (TLS 1.2+) client may send the signature_algorithms extension in ClientHello.booleanclientSendSignatureAlgorithmsCertConfigures whether a (TLS 1.2+) client may send the signature_algorithms_cert extension in ClientHello.ProtocolVersion[]clientSupportedVersionsConfigures the supported protocol versions for the client.static intCRYPTO_BCstatic intCRYPTO_JCAstatic booleanDEBUGintexpectFatalAlertConnectionEndConfigures the connection end that a fatal alert is expected to be raised.shortexpectFatalAlertDescriptionConfigures the type of fatal alert expected to be raised.static intSERVER_CERT_REQ_MANDATORYServer will request a client certificate and receiving one is mandatorystatic intSERVER_CERT_REQ_NONEServer will not request a client certificatestatic intSERVER_CERT_REQ_OPTIONALServer will request a client certificate but receiving one is optionalSignatureAndHashAlgorithmserverAuthSigAlgIf 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).intserverCertReqConfigures whether the test server will send a certificate request.java.util.VectorserverCertReqSigAlgsIf TLS 1.2 or higher is negotiated, configures the set of supported signature algorithms in the CertificateRequest (if one is sent).booleanserverCheckSigAlgOfClientCertsControl the result the server will return fromTlsPeer.shouldCheckSigAlgOfPeerCerts().intserverCryptoProtocolVersionserverNegotiateVersionConfigures a protocol version the server will unconditionally negotiate.ProtocolVersion[]serverSupportedVersionsConfigures the supported protocol versions for the server.
-
Constructor Summary
Constructors Constructor Description TlsTestConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexpectClientFatalAlert(short alertDescription)voidexpectServerFatalAlert(short alertDescription)
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
CLIENT_AUTH_NONE
public static final int CLIENT_AUTH_NONE
Client does not authenticate, ignores any certificate request- See Also:
- Constant Field Values
-
CLIENT_AUTH_VALID
public static final int CLIENT_AUTH_VALID
Client will authenticate if it receives a certificate request- See Also:
- Constant Field Values
-
CLIENT_AUTH_INVALID_CERT
public static final int CLIENT_AUTH_INVALID_CERT
Client will authenticate if it receives a certificate request, with an invalid certificate- See Also:
- Constant Field Values
-
CLIENT_AUTH_INVALID_VERIFY
public static final int CLIENT_AUTH_INVALID_VERIFY
Client will authenticate if it receives a certificate request, with an invalid CertificateVerify signature- See Also:
- Constant Field Values
-
CRYPTO_BC
public static final int CRYPTO_BC
- See Also:
- Constant Field Values
-
CRYPTO_JCA
public static final int CRYPTO_JCA
- See Also:
- Constant Field Values
-
SERVER_CERT_REQ_NONE
public static final int SERVER_CERT_REQ_NONE
Server will not request a client certificate- See Also:
- Constant Field Values
-
SERVER_CERT_REQ_OPTIONAL
public static final int SERVER_CERT_REQ_OPTIONAL
Server will request a client certificate but receiving one is optional- See Also:
- Constant Field Values
-
SERVER_CERT_REQ_MANDATORY
public static final int SERVER_CERT_REQ_MANDATORY
Server will request a client certificate and receiving one is mandatory- See Also:
- Constant Field Values
-
clientAuth
public int clientAuth
Configures the client authentication behaviour of the test client. Use CLIENT_AUTH_* constants.
-
clientAuthSigAlg
public SignatureAndHashAlgorithm 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
public SignatureAndHashAlgorithm 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 clientCheckSigAlgOfServerCerts
Control the result the client will return fromTlsPeer.shouldCheckSigAlgOfPeerCerts().
-
clientCrypto
public int clientCrypto
-
clientEmptyKeyShare
public boolean clientEmptyKeyShare
Configures whether the client will send an empty key_share extension in initial ClientHello.
-
clientFallback
public boolean clientFallback
Configures whether the client will indicate version fallback via TLS_FALLBACK_SCSV.
-
clientSendSignatureAlgorithms
public boolean clientSendSignatureAlgorithms
Configures whether a (TLS 1.2+) client may send the signature_algorithms extension in ClientHello.
-
clientSendSignatureAlgorithmsCert
public boolean clientSendSignatureAlgorithmsCert
Configures whether a (TLS 1.2+) client may send the signature_algorithms_cert extension in ClientHello.
-
clientSupportedVersions
public ProtocolVersion[] clientSupportedVersions
Configures the supported protocol versions for the client. If null, uses the library's default.
-
serverAuthSigAlg
public SignatureAndHashAlgorithm 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 serverCertReq
Configures whether the test server will send a certificate request.
-
serverCertReqSigAlgs
public java.util.Vector 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 serverCheckSigAlgOfClientCerts
Control the result the server will return fromTlsPeer.shouldCheckSigAlgOfPeerCerts().
-
serverCrypto
public int serverCrypto
-
serverNegotiateVersion
public ProtocolVersion serverNegotiateVersion
Configures a protocol version the server will unconditionally negotiate. Ignored if null.
-
serverSupportedVersions
public ProtocolVersion[] serverSupportedVersions
Configures the supported protocol versions for the server. If null, uses the library's default.
-
expectFatalAlertConnectionEnd
public int expectFatalAlertConnectionEnd
Configures the connection end that a fatal alert is expected to be raised. Use ConnectionEnd.* constants.
-
expectFatalAlertDescription
public short expectFatalAlertDescription
Configures the type of fatal alert expected to be raised. Use AlertDescription.* constants.
-
-