Package COM.activesw.api.client
Class BrokerSSLConfigV2
java.lang.Object
COM.activesw.api.client.BrokerSSLConfigV2
This class is a data structure used to describe a broker's SSL configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static enum
static enum
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty SSL config objectBrokerSSLConfigV2
(BrokerSSLConfigV2 source) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the current cipher suites specification for this configurationgetCrl()
Get the SSL Crl used by this configurationReturn the type of the crl fileGet the SSL Keystore used by this configurationReturns the password for the keystoreReturn the type of the keystore fileGet the current SSL Protocols allowedGet the SSL Truststore used by this configurationReturn the type of the truststore fileint
Get the number of CA certificates in a verification chain to check.int
hashCode()
void
setCipherSuites
(String newCipherSuites) Specify the cipher suites to allow with this configuration.void
Set the SSL Crl used by this configuration.void
setCrlType
(String crlType) Set the crl file type.void
setKeystore
(String newKeystore) Set the SSL Keystore used by this configuration.void
setKeystorePassword
(String newPassword) Set the password for the keystorevoid
setKeystoreType
(BrokerSSLConfigV2.KeystoreType newKeystoreType) Set the keystore file type.void
setKeystoreType
(String newKeystoreType) Set the keystore file type.void
setSslProtocol
(String newSslProtocol) Set the SSL protocols that this configuration allows.void
setTruststore
(String newTruststore) Set the SSL Truststore used by this configuration.void
setTruststoreType
(BrokerSSLConfigV2.TruststoreType newTruststoreType) Set the truststore file type.void
setTruststoreType
(String newTruststoreType) Set the truststore file type.void
setVerifyDepth
(int newVerifyDepth) Set the maximum number of CA certificates to verify in a certificate chain.toString
(int indent_level) Convert to a string.
-
Constructor Details
-
BrokerSSLConfigV2
public BrokerSSLConfigV2()Create an empty SSL config object -
BrokerSSLConfigV2
-
-
Method Details
-
getKeystore
Get the SSL Keystore used by this configuration- Returns:
- the SSL Keystore
-
setKeystore
Set the SSL Keystore used by this configuration. ThenewKeystore
parameter must be the full path to the keystore file on the machine where the Broker Server is running.- Parameters:
newKeystore
- path to keystore
-
getKeystorePassword
Returns the password for the keystore- Returns:
- the password for the keystore
-
setKeystorePassword
Set the password for the keystore- Parameters:
newPassword
- keystore password
-
getKeystoreType
Return the type of the keystore file- Returns:
- the keystore file type
-
setKeystoreType
Set the keystore file type.- Parameters:
newKeystoreType
- the type of the keystore file
-
setKeystoreType
Set the keystore file type. The type must be:KEYSTORE_TYPE_PKCS12/code>
KEYSTORE_TYPE_PEM
ornull
If the type is
null
, then the default keystore type (KEYSTORE_TYPE_PKCS12
) is used.
- Parameters:
newKeystoreType
- the type of the keystore file- Throws:
BrokerSSLConfigException
- if the keystore type is not valid
-
getTruststore
Get the SSL Truststore used by this configuration- Returns:
- the SSL Truststore
-
setTruststore
Set the SSL Truststore used by this configuration. ThenewTruststore
parameter must be the full path to the truststore file on the machine where the Broker Server is running.- Parameters:
newTruststore
- path to keystore
-
getTruststoreType
Return the type of the truststore file- Returns:
- the truststore file type
-
setTruststoreType
Set the truststore file type.- Parameters:
newTruststoreType
- the type of the truststore file
-
setTruststoreType
Set the truststore file type. The type must be:TRUSTSTORE_TYPE_PEM/code>
TRUSTSTORE_TYPE_DIR
ornull
If the type is
null
, then the default truststore type (TRUSTSTORE_TYPE_PEM
) is used.
- Parameters:
newTruststoreType
- the type of the truststore file- Throws:
BrokerSSLConfigException
- if the truststore type is not valid
-
getSslProtocol
Get the current SSL Protocols allowed- Returns:
- the current SSL protocols allowed with this configuration
-
setSslProtocol
Set the SSL protocols that this configuration allows. The allowed values are:SSL_PROTOCOL_ALL
SSL_PROTOCOL_SSLV3
orSSL_PROTOCOL_TLSV1
ornull
If the type is
null, then the default SSL protocol type (
SSL_PROTOCOL_ALL
) is used.SSL_PROTOCOL_ALL
allows the use of either SSLv3 or TLSv1. It does not allow SSLv2 or earlier.
- Parameters:
newSslProtocol
- the protocols to allow- Throws:
BrokerSSLConfigException
- if the specified protocol is not valid
-
getCrl
Get the SSL Crl used by this configuration- Returns:
- the path to the SSL CRL file used by this configuration.
-
setCrl
Set the SSL Crl used by this configuration. Thecrl
parameter must be the full path to the crl file on the machine where the Broker Server is running.- Parameters:
crl
- path to crl
-
getCrlType
Return the type of the crl file- Returns:
- the crl file type
-
setCrlType
Set the crl file type. The type must be:PEM
,
DER
If the crl type is
null
, then the default crl type (PEM
) is used.- Parameters:
crlType
- the type of the crl file- Throws:
BrokerSSLConfigException
- if the crl type is not valid
-
getCipherSuites
Return the current cipher suites specification for this configuration- Returns:
- the current cipher suites string
-
setCipherSuites
Specify the cipher suites to allow with this configuration.The string must be in
OpenSSL
format but is not checked by the API.- Parameters:
newCipherSuites
- the cipher suite specification
-
getVerifyDepth
public int getVerifyDepth()Get the number of CA certificates in a verification chain to check. If the certificate chain exceeds this number, then the connection is rejected.- Returns:
- the current maximum number
-
setVerifyDepth
Set the maximum number of CA certificates to verify in a certificate chain.The default is 9.
- Parameters:
newVerifyDepth
- the max number of certificates to verify- Throws:
BrokerSSLConfigException
- if the specified number is less than zero
-
equals
-
hashCode
public int hashCode() -
toString
Convert to a string. The "indent_level" is the number of 4-space indents that the output should be generated for.
-