public class BrokerSSLConfigV2
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BrokerSSLConfigV2.CRLType |
static class |
BrokerSSLConfigV2.KeystoreType |
static class |
BrokerSSLConfigV2.SSLProtocol |
static class |
BrokerSSLConfigV2.TruststoreType |
Constructor and Description |
---|
BrokerSSLConfigV2()
Create an empty SSL config object
|
BrokerSSLConfigV2(BrokerSSLConfigV2 source) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object sslConfig) |
java.lang.String |
getCipherSuites()
Return the current cipher suites specification for this configuration
|
java.lang.String |
getCrl()
Get the SSL Crl used by this configuration
|
BrokerSSLConfigV2.CRLType |
getCrlType()
Return the type of the crl file
|
java.lang.String |
getKeystore()
Get the SSL Keystore used by this configuration
|
java.lang.String |
getKeystorePassword()
Returns the password for the keystore
|
BrokerSSLConfigV2.KeystoreType |
getKeystoreType()
Return the type of the keystore file
|
BrokerSSLConfigV2.SSLProtocol |
getSslProtocol()
Get the current SSL Protocols allowed
|
java.lang.String |
getTruststore()
Get the SSL Truststore used by this configuration
|
BrokerSSLConfigV2.TruststoreType |
getTruststoreType()
Return the type of the truststore file
|
int |
getVerifyDepth()
Get the number of CA certificates in a verification chain to check.
|
int |
hashCode() |
void |
setCipherSuites(java.lang.String newCipherSuites)
Specify the cipher suites to allow with this configuration.
|
void |
setCrl(java.lang.String crl)
Set the SSL Crl used by this configuration.
|
void |
setCrlType(java.lang.String crlType)
Set the crl file type.
|
void |
setKeystore(java.lang.String newKeystore)
Set the SSL Keystore used by this configuration.
|
void |
setKeystorePassword(java.lang.String newPassword)
Set the password for the keystore
|
void |
setKeystoreType(BrokerSSLConfigV2.KeystoreType newKeystoreType)
Set the keystore file type.
|
void |
setKeystoreType(java.lang.String newKeystoreType)
Set the keystore file type.
|
void |
setSslProtocol(java.lang.String newSslProtocol)
Set the SSL protocols that this configuration allows.
|
void |
setTruststore(java.lang.String newTruststore)
Set the SSL Truststore used by this configuration.
|
void |
setTruststoreType(BrokerSSLConfigV2.TruststoreType newTruststoreType)
Set the truststore file type.
|
void |
setTruststoreType(java.lang.String newTruststoreType)
Set the truststore file type.
|
void |
setVerifyDepth(int newVerifyDepth)
Set the maximum number of CA certificates to verify in a certificate chain.
|
java.lang.String |
toString(int indent_level)
Convert to a string.
|
public BrokerSSLConfigV2()
public BrokerSSLConfigV2(BrokerSSLConfigV2 source)
public java.lang.String getKeystore()
public void setKeystore(java.lang.String newKeystore)
newKeystore
parameter must be the full path to the keystore file on the machine where
the Broker Server is running.newKeystore
- path to keystorepublic java.lang.String getKeystorePassword()
public void setKeystorePassword(java.lang.String newPassword)
newPassword
- keystore passwordpublic BrokerSSLConfigV2.KeystoreType getKeystoreType()
public void setKeystoreType(BrokerSSLConfigV2.KeystoreType newKeystoreType)
newKeystoreType
- the type of the keystore filepublic void setKeystoreType(java.lang.String newKeystoreType) throws BrokerSSLConfigException
KEYSTORE_TYPE_PKCS12/code>
KEYSTORE_TYPE_PEM
or
null
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
public java.lang.String getTruststore()
Get the SSL Truststore used by this configuration
- Returns:
- the SSL Truststore
-
setTruststore
public void setTruststore(java.lang.String newTruststore)
Set the SSL Truststore used by this configuration. The newTruststore
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
public BrokerSSLConfigV2.TruststoreType getTruststoreType()
Return the type of the truststore file
- Returns:
- the truststore file type
-
setTruststoreType
public void setTruststoreType(BrokerSSLConfigV2.TruststoreType newTruststoreType)
Set the truststore file type.
- Parameters:
newTruststoreType
- the type of the truststore file
-
setTruststoreType
public void setTruststoreType(java.lang.String newTruststoreType)
throws BrokerSSLConfigException
Set the truststore file type. The type must be:
TRUSTSTORE_TYPE_PEM/code>
TRUSTSTORE_TYPE_DIR
or
null
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
public BrokerSSLConfigV2.SSLProtocol getSslProtocol()
Get the current SSL Protocols allowed
- Returns:
- the current SSL protocols allowed with this configuration
-
setSslProtocol
public void setSslProtocol(java.lang.String newSslProtocol)
throws BrokerSSLConfigException
Set the SSL protocols that this configuration allows. The allowed values are:
SSL_PROTOCOL_ALL
SSL_PROTOCOL_SSLV3
or
SSL_PROTOCOL_TLSV1
or
null
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
public java.lang.String getCrl()
Get the SSL Crl used by this configuration
- Returns:
- the path to the SSL CRL file used by this configuration.
-
setCrl
public void setCrl(java.lang.String crl)
Set the SSL Crl used by this configuration. The crl
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
public BrokerSSLConfigV2.CRLType getCrlType()
Return the type of the crl file
- Returns:
- the crl file type
-
setCrlType
public void setCrlType(java.lang.String crlType)
throws BrokerSSLConfigException
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
public java.lang.String getCipherSuites()
Return the current cipher suites specification for this configuration
- Returns:
- the current cipher suites string
-
setCipherSuites
public void setCipherSuites(java.lang.String newCipherSuites)
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
public void setVerifyDepth(int newVerifyDepth)
throws BrokerSSLConfigException
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
public boolean equals(java.lang.Object sslConfig)
- Overrides:
equals
in class java.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
-
toString
public java.lang.String toString(int indent_level)
Convert to a string. The "indent_level" is the number of 4-space indents that the output should be generated for.
Copyright © 2002-2006 webMethods, Inc. Copyright © 2007-2021 Software AG Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.