Class EPPSSLConfig
- java.lang.Object
-
- com.verisign.epp.transport.client.EPPSSLConfig
-
public class EPPSSLConfig extends java.lang.Object
TheEPPSSLConfig
class contains SSL configuration properties that can be used in conjunction withEPPSSLImpl.initialize(EPPSSLConfig)
to initialize anEPPSSLContext
. The required properties include:
sslProtocol
that defines the SSL protocol to use. For example, "TLS".identityStoreType
that defines the type of the identity KeyStore. For example, "JKS".identityFileName
that defines the name of the identity KeyStore file. For example, "identity.jks".identityPassPhrase
that defines the passphrase/password to access the identity KeyStore file defined by theidentityFileName
property.
The optional properties include:
identityKeyPassPhrase
that defines the passphrase/password for the private key stored in the identity KeyStore. If not defined, the value of theidentityPassPhrase
will be used.trustStoreType
that defines the KeyStore type of the Trust Store. This is only required if the Trust Store is defined by thetrustStoreFileName
property. For example, "JKS".trustStoreFileName
that defines the name of the Trust Store file. For example, "trust.jks". If note defined, the default JDK Trust Store will be used that is located at the path$JAVA_HOME/lib/security/cacerts
.trustStorePassPhrase
that defines the passphrase/password to access the identity KeyStore file defined by thetrustStoreFileName
property. This is only required if the Trust Store is defined by thetrustStoreFileName
property.sslDebug
that defines that value of the SSL debug Java system propertyjavax.net.debug
. If not set, than thejavax.net.debug
system property will not set. The possible values include "none" and "all" and since it sets a Java system property it will global apply across all SSL connections om the Java process.sslEnabledProtocols
that defines the support SSL protocols supported. If not defined, the default protocols provided by the JSSE provider will be used. For example, {"TLSv1", "SSLv3"}.sslEnabledCipherSuites
that defines the support SSL cipher suites supported. If not defined, the default cipher suites provided by the JSSE provider will be used. For example,SSL_RSA_WITH_RC4_128_MD5 SSL_RSA_WITH_RC4_128_SHA
.
- See Also:
EPPSSLImpl
,EPPSSLContext
-
-
Constructor Summary
Constructors Constructor Description EPPSSLConfig()
Default constructor.EPPSSLConfig(java.lang.String aSslProtocol, java.lang.String aIdentityStoreType, java.lang.String aIdentityFileName, java.lang.String aIdentityPassPhrase)
Creates an instance ofEPPSSLConfig
that takes the required set of attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getIdentityFileName()
Gets the Identity File NameString
.java.lang.String
getIdentityKeyPassPhrase()
Gets the Identity Key Pass PhraseString
using the Identity Pass Phrase as the default value.char[]
getIdentityKeyPassPhraseCharArray()
Gets the Identity Key Pass Phrase aschar[]
using the Identity Pass Phrase as the default value.java.lang.String
getIdentityPassPhrase()
Gets the Identity Pass PhraseString
.char[]
getIdentityPassPhraseCharArray()
Gets the Identity Pass Phrase as achar[]
.java.lang.String
getIdentityStoreType()
Gets the Identity Store TypeString
.java.lang.String
getSslDebug()
Gets the SSL DebugString
.java.lang.String[]
getSSLEnabledCipherSuites()
Gets the optional SSL enabled cipher suitesString
array.java.lang.String[]
getSSLEnabledProtocols()
Gets the optional SSL enabled protocolsString
array.java.lang.String
getSslProtocol()
Gets the SSL ProtocolString
.java.lang.String
getTrustStoreFileName()
Gets the Trust Store File NameString
.java.lang.String
getTrustStorePassPhrase()
Gets the Trust Store Pass PhraseString
.char[]
getTrustStorePassPhraseCharArray()
Gets the Trust Store Pass Phrase aschar[]
.java.lang.String
getTrustStoreType()
Gets the Trust Store TypeString
.void
setIdentityFileName(java.lang.String aIdentityFileName)
Sets the Identity File NameString
.void
setIdentityKeyPassPhrase(java.lang.String aIdentityKeyPassPhrase)
Sets the Identity Key Pass PhraseString
.void
setIdentityPassPhrase(java.lang.String aIdentityPassPhrase)
Sets the Identity Pass PhraseString
.void
setIdentityStoreType(java.lang.String aIdentityStoreType)
Sets the Identity Store TypeString
.void
setSslDebug(java.lang.String aSslDebug)
Sets the SSL DebugString
.void
setSSLEnabledCipherSuites(java.lang.String aSslEnabledCipherSuites)
Sets the optional SSL enabled cipher suites using a space delimited list of cipher suites.void
setSSLEnabledCipherSuites(java.lang.String[] aSslEnabledCipherSuites)
Sets the optional SSL enabled cipher suitesString
array.void
setSSLEnabledProtocols(java.lang.String aSslEnabledProtocols)
Sets the optional SSL enabled protocols using a space delimited list of protocols.void
setSSLEnabledProtocols(java.lang.String[] aSslEnabledProtocols)
Sets the optional SSL enabled protocolsString
array.void
setSslProtocol(java.lang.String aSslProtocol)
Sets the SSL ProtocolString
.void
setTrustStore(java.lang.String aTrustStoreType, java.lang.String aTrustStoreFileName, java.lang.String aTrustStorePassPhrase)
Sets the required Trust Store properties if the Trust Store is explicitely set.void
setTrustStoreFileName(java.lang.String aTrustStoreFileName)
Sets the Trust Store File NameString
.void
setTrustStorePassPhrase(java.lang.String aTrustStorePassPhrase)
Sets the Trust Store Pass PhraseString
.void
setTrustStoreType(java.lang.String aTrustStoreType)
Sets the Trust Store TypeString
.java.lang.String
toString()
Output the contents of theEPPSSLConfig
instance which includes a comma seperated list ofEPPSSLConfig
properties with the values.void
validate()
Validates the properties of theEPPSSLConfig
by checking that the required properties are set.
-
-
-
Constructor Detail
-
EPPSSLConfig
public EPPSSLConfig()
Default constructor.
-
EPPSSLConfig
public EPPSSLConfig(java.lang.String aSslProtocol, java.lang.String aIdentityStoreType, java.lang.String aIdentityFileName, java.lang.String aIdentityPassPhrase)
Creates an instance ofEPPSSLConfig
that takes the required set of attributes.- Parameters:
aSslProtocol
- SSL Protocol like "TLS"aIdentityStoreType
- Identity store type like "JKS"aIdentityFileName
- Identity store file nameaIdentityPassPhrase
- Identity store passphrase/password
-
-
Method Detail
-
getIdentityFileName
public java.lang.String getIdentityFileName()
Gets the Identity File NameString
.- Returns:
String
if set;null
otherwise.
-
setIdentityFileName
public void setIdentityFileName(java.lang.String aIdentityFileName)
Sets the Identity File NameString
.- Parameters:
aIdentityFileName
-String
.
-
getIdentityKeyPassPhrase
public java.lang.String getIdentityKeyPassPhrase()
Gets the Identity Key Pass PhraseString
using the Identity Pass Phrase as the default value.- Returns:
- Identity Key Pass Phrase if set; otherwise the Identity Pass Phrase
-
getIdentityKeyPassPhraseCharArray
public char[] getIdentityKeyPassPhraseCharArray()
Gets the Identity Key Pass Phrase aschar[]
using the Identity Pass Phrase as the default value.- Returns:
- Identity Key Pass Phrase if set; otherwise the Identity Pass Phrase as
char[]
-
setIdentityKeyPassPhrase
public void setIdentityKeyPassPhrase(java.lang.String aIdentityKeyPassPhrase)
Sets the Identity Key Pass PhraseString
.- Parameters:
aIdentityKeyPassPhrase
-String
.
-
getIdentityPassPhrase
public java.lang.String getIdentityPassPhrase()
Gets the Identity Pass PhraseString
.- Returns:
- Identity Pass Phrase if set;
null
otherwise.
-
getIdentityPassPhraseCharArray
public char[] getIdentityPassPhraseCharArray()
Gets the Identity Pass Phrase as achar[]
.- Returns:
- Identity Pass Phrase if set;
null
otherwise.
-
setIdentityPassPhrase
public void setIdentityPassPhrase(java.lang.String aIdentityPassPhrase)
Sets the Identity Pass PhraseString
.- Parameters:
aIdentityPassPhrase
-String
.
-
getIdentityStoreType
public java.lang.String getIdentityStoreType()
Gets the Identity Store TypeString
.- Returns:
String
if set;null
otherwise.
-
setIdentityStoreType
public void setIdentityStoreType(java.lang.String aIdentityStoreType)
Sets the Identity Store TypeString
.- Parameters:
aIdentityStoreType
-String
.
-
getSslDebug
public java.lang.String getSslDebug()
Gets the SSL DebugString
.- Returns:
String
if set;null
otherwise.
-
setSslDebug
public void setSslDebug(java.lang.String aSslDebug)
Sets the SSL DebugString
.- Parameters:
aSslDebug
-String
.
-
getSslProtocol
public java.lang.String getSslProtocol()
Gets the SSL ProtocolString
.- Returns:
String
if set;null
otherwise.
-
setSslProtocol
public void setSslProtocol(java.lang.String aSslProtocol)
Sets the SSL ProtocolString
.- Parameters:
aSslProtocol
-String
.
-
setTrustStore
public void setTrustStore(java.lang.String aTrustStoreType, java.lang.String aTrustStoreFileName, java.lang.String aTrustStorePassPhrase)
Sets the required Trust Store properties if the Trust Store is explicitely set.- Parameters:
aTrustStoreType
- Keystore type of the Trust Store like "JKS"aTrustStoreFileName
- Trust Store file nameaTrustStorePassPhrase
- Trust Store passphrase/password
-
getTrustStoreType
public java.lang.String getTrustStoreType()
Gets the Trust Store TypeString
.- Returns:
String
if set;null
otherwise.
-
setTrustStoreType
public void setTrustStoreType(java.lang.String aTrustStoreType)
Sets the Trust Store TypeString
.- Parameters:
aTrustStoreType
-String
.
-
getTrustStoreFileName
public java.lang.String getTrustStoreFileName()
Gets the Trust Store File NameString
.- Returns:
String
if set;null
otherwise.
-
setTrustStoreFileName
public void setTrustStoreFileName(java.lang.String aTrustStoreFileName)
Sets the Trust Store File NameString
.- Parameters:
aTrustStoreFileName
-String
.
-
getTrustStorePassPhrase
public java.lang.String getTrustStorePassPhrase()
Gets the Trust Store Pass PhraseString
.- Returns:
- Trust Store Pass Phrase if set;
null
otherwise.
-
getTrustStorePassPhraseCharArray
public char[] getTrustStorePassPhraseCharArray()
Gets the Trust Store Pass Phrase aschar[]
.- Returns:
- Trust Store Pass Phrase if set;
null
otherwise.
-
setTrustStorePassPhrase
public void setTrustStorePassPhrase(java.lang.String aTrustStorePassPhrase)
Sets the Trust Store Pass PhraseString
.- Parameters:
aTrustStorePassPhrase
-String
.
-
getSSLEnabledProtocols
public java.lang.String[] getSSLEnabledProtocols()
Gets the optional SSL enabled protocolsString
array.- Returns:
String
array if set;null
otherwise.
-
setSSLEnabledProtocols
public void setSSLEnabledProtocols(java.lang.String[] aSslEnabledProtocols)
Sets the optional SSL enabled protocolsString
array.- Parameters:
aSslEnabledProtocols
-String
array of enabled SSL protocols
-
setSSLEnabledProtocols
public void setSSLEnabledProtocols(java.lang.String aSslEnabledProtocols)
Sets the optional SSL enabled protocols using a space delimited list of protocols.- Parameters:
aSslEnabledProtocols
- space delimited list of enabled SSL protocols
-
getSSLEnabledCipherSuites
public java.lang.String[] getSSLEnabledCipherSuites()
Gets the optional SSL enabled cipher suitesString
array.- Returns:
>String
array if set;null
otherwise.
-
setSSLEnabledCipherSuites
public void setSSLEnabledCipherSuites(java.lang.String[] aSslEnabledCipherSuites)
Sets the optional SSL enabled cipher suitesString
array.- Parameters:
aSslEnabledCipherSuites
-String
array of enabled SSL cipher suites
-
setSSLEnabledCipherSuites
public void setSSLEnabledCipherSuites(java.lang.String aSslEnabledCipherSuites)
Sets the optional SSL enabled cipher suites using a space delimited list of cipher suites.- Parameters:
aSslEnabledCipherSuites
- space delimited list of enabled SSL cipher suites
-
validate
public void validate() throws EPPException
Validates the properties of theEPPSSLConfig
by checking that the required properties are set.- Throws:
EPPException
- On error
-
toString
public java.lang.String toString()
Output the contents of theEPPSSLConfig
instance which includes a comma seperated list ofEPPSSLConfig
properties with the values. For example, "sslProtocol = <value>".- Overrides:
toString
in classjava.lang.Object
- Returns:
String
containing theEPPSSLConfig
properties and values
-
-