Class EPPSSLConfig
- java.lang.Object
-
- com.verisign.epp.transport.client.EPPSSLConfig
-
public class EPPSSLConfig extends java.lang.ObjectTheEPPSSLConfigclass contains SSL configuration properties that can be used in conjunction withEPPSSLImpl.initialize(EPPSSLConfig)to initialize anEPPSSLContext. The required properties include:
sslProtocolthat defines the SSL protocol to use. For example, "TLS".identityStoreTypethat defines the type of the identity KeyStore. For example, "JKS".identityFileNamethat defines the name of the identity KeyStore file. For example, "identity.jks".identityPassPhrasethat defines the passphrase/password to access the identity KeyStore file defined by theidentityFileNameproperty.
The optional properties include:
identityKeyPassPhrasethat defines the passphrase/password for the private key stored in the identity KeyStore. If not defined, the value of theidentityPassPhrasewill be used.trustStoreTypethat defines the KeyStore type of the Trust Store. This is only required if the Trust Store is defined by thetrustStoreFileNameproperty. For example, "JKS".trustStoreFileNamethat 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.trustStorePassPhrasethat defines the passphrase/password to access the identity KeyStore file defined by thetrustStoreFileNameproperty. This is only required if the Trust Store is defined by thetrustStoreFileNameproperty.sslDebugthat defines that value of the SSL debug Java system propertyjavax.net.debug. If not set, than thejavax.net.debugsystem 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.sslEnabledProtocolsthat defines the support SSL protocols supported. If not defined, the default protocols provided by the JSSE provider will be used. For example, {"TLSv1", "SSLv3"}.sslEnabledCipherSuitesthat 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 ofEPPSSLConfigthat takes the required set of attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetIdentityFileName()Gets the Identity File NameString.java.lang.StringgetIdentityKeyPassPhrase()Gets the Identity Key Pass PhraseStringusing 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.StringgetIdentityPassPhrase()Gets the Identity Pass PhraseString.char[]getIdentityPassPhraseCharArray()Gets the Identity Pass Phrase as achar[].java.lang.StringgetIdentityStoreType()Gets the Identity Store TypeString.java.lang.StringgetSslDebug()Gets the SSL DebugString.java.lang.String[]getSSLEnabledCipherSuites()Gets the optional SSL enabled cipher suitesStringarray.java.lang.String[]getSSLEnabledProtocols()Gets the optional SSL enabled protocolsStringarray.java.lang.StringgetSslProtocol()Gets the SSL ProtocolString.java.lang.StringgetTrustStoreFileName()Gets the Trust Store File NameString.java.lang.StringgetTrustStorePassPhrase()Gets the Trust Store Pass PhraseString.char[]getTrustStorePassPhraseCharArray()Gets the Trust Store Pass Phrase aschar[].java.lang.StringgetTrustStoreType()Gets the Trust Store TypeString.voidsetIdentityFileName(java.lang.String aIdentityFileName)Sets the Identity File NameString.voidsetIdentityKeyPassPhrase(java.lang.String aIdentityKeyPassPhrase)Sets the Identity Key Pass PhraseString.voidsetIdentityPassPhrase(java.lang.String aIdentityPassPhrase)Sets the Identity Pass PhraseString.voidsetIdentityStoreType(java.lang.String aIdentityStoreType)Sets the Identity Store TypeString.voidsetSslDebug(java.lang.String aSslDebug)Sets the SSL DebugString.voidsetSSLEnabledCipherSuites(java.lang.String aSslEnabledCipherSuites)Sets the optional SSL enabled cipher suites using a space delimited list of cipher suites.voidsetSSLEnabledCipherSuites(java.lang.String[] aSslEnabledCipherSuites)Sets the optional SSL enabled cipher suitesStringarray.voidsetSSLEnabledProtocols(java.lang.String aSslEnabledProtocols)Sets the optional SSL enabled protocols using a space delimited list of protocols.voidsetSSLEnabledProtocols(java.lang.String[] aSslEnabledProtocols)Sets the optional SSL enabled protocolsStringarray.voidsetSslProtocol(java.lang.String aSslProtocol)Sets the SSL ProtocolString.voidsetTrustStore(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.voidsetTrustStoreFileName(java.lang.String aTrustStoreFileName)Sets the Trust Store File NameString.voidsetTrustStorePassPhrase(java.lang.String aTrustStorePassPhrase)Sets the Trust Store Pass PhraseString.voidsetTrustStoreType(java.lang.String aTrustStoreType)Sets the Trust Store TypeString.java.lang.StringtoString()Output the contents of theEPPSSLConfiginstance which includes a comma seperated list ofEPPSSLConfigproperties with the values.voidvalidate()Validates the properties of theEPPSSLConfigby 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 ofEPPSSLConfigthat 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:
Stringif set;nullotherwise.
-
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 PhraseStringusing 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;
nullotherwise.
-
getIdentityPassPhraseCharArray
public char[] getIdentityPassPhraseCharArray()
Gets the Identity Pass Phrase as achar[].- Returns:
- Identity Pass Phrase if set;
nullotherwise.
-
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:
Stringif set;nullotherwise.
-
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:
Stringif set;nullotherwise.
-
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:
Stringif set;nullotherwise.
-
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:
Stringif set;nullotherwise.
-
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:
Stringif set;nullotherwise.
-
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;
nullotherwise.
-
getTrustStorePassPhraseCharArray
public char[] getTrustStorePassPhraseCharArray()
Gets the Trust Store Pass Phrase aschar[].- Returns:
- Trust Store Pass Phrase if set;
nullotherwise.
-
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 protocolsStringarray.- Returns:
Stringarray if set;nullotherwise.
-
setSSLEnabledProtocols
public void setSSLEnabledProtocols(java.lang.String[] aSslEnabledProtocols)
Sets the optional SSL enabled protocolsStringarray.- Parameters:
aSslEnabledProtocols-Stringarray 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 suitesStringarray.- Returns:
>Stringarray if set;nullotherwise.
-
setSSLEnabledCipherSuites
public void setSSLEnabledCipherSuites(java.lang.String[] aSslEnabledCipherSuites)
Sets the optional SSL enabled cipher suitesStringarray.- Parameters:
aSslEnabledCipherSuites-Stringarray 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 EPPExceptionValidates the properties of theEPPSSLConfigby checking that the required properties are set.- Throws:
EPPException- On error
-
toString
public java.lang.String toString()
Output the contents of theEPPSSLConfiginstance which includes a comma seperated list ofEPPSSLConfigproperties with the values. For example, "sslProtocol = <value>".- Overrides:
toStringin classjava.lang.Object- Returns:
Stringcontaining theEPPSSLConfigproperties and values
-
-