Class EPPSSLConfig
java.lang.Object
com.verisign.epp.transport.client.EPPSSLConfig
The
The optional properties include:
EPPSSLConfig class contains SSL configuration properties that can
be used in conjunction with EPPSSLImpl.initialize(EPPSSLConfig) to
initialize an EPPSSLContext. 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:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EPPSSLConfig(String aSslProtocol, String aIdentityStoreType, String aIdentityFileName, String aIdentityPassPhrase) Creates an instance ofEPPSSLConfigthat takes the required set of attributes. -
Method Summary
Modifier and TypeMethodDescriptionGets the Identity File NameString.Gets the Identity Key Pass PhraseStringusing the Identity Pass Phrase as the default value.char[]Gets the Identity Key Pass Phrase aschar[]using the Identity Pass Phrase as the default value.Gets the Identity Pass PhraseString.char[]Gets the Identity Pass Phrase as achar[].Gets the Identity Store TypeString.Gets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the client certificate.Gets the SSL DebugString.String[]Gets the enabled SSL cipher suites.String[]Gets the optional SSL enabled cipher suitesStringarray.String[]Gets the enabled SSL protocols.String[]Gets the optional SSL enabled protocolsStringarray.Gets the SSL ProtocolString.Gets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the server certificate.Gets the Trust Store File NameString.Gets the Trust Store Pass PhraseString.char[]Gets the Trust Store Pass Phrase aschar[].Gets the Trust Store TypeString.booleanis host name verification disabled, which should only be used in Development.booleanDisable host name verification? This should only be set totruein Development and is set by default tofalse.voidsetIdentityFileName(String aIdentityFileName) Sets the Identity File NameString.voidsetIdentityKeyPassPhrase(String aIdentityKeyPassPhrase) Sets the Identity Key Pass PhraseString.voidsetIdentityPassPhrase(String aIdentityPassPhrase) Sets the Identity Pass PhraseString.voidsetIdentityStoreType(String aIdentityStoreType) Sets the Identity Store TypeString.voidsetSslClientEKUs(List<String> clientEKUs) Sets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the client certificate.voidsetSslClientEKUsFromPropValue(String aClientEKUPropValue) Sets the list of trusted X.509 Extended Key Usage (EKU) values from an EPP configuration property value, where at least one of the values must exist in the client certificate.voidsetSslDebug(String aSslDebug) Sets the SSL DebugString.voidsetSslDisableHostnameVerification(boolean sslDisableHostnameVerification) Disable host name verification, which should only be used in Development.voidsetSSLDisableHostnameVerification(boolean aDisableHostnameVerification) Sets the disable host name verification property, which defaults tofalseand should only be set totruein Development.voidsetSslEnabledCipherSuites(String[] aSslEnabledCipherSuites) Sets the enabled SSL cipher suites.voidsetSSLEnabledCipherSuites(String aSslEnabledCipherSuites) Sets the optional SSL enabled cipher suites using a space delimited list of cipher suites.voidsetSSLEnabledCipherSuites(String[] aSslEnabledCipherSuites) Sets the optional SSL enabled cipher suitesStringarray.voidsetSslEnabledProtocols(String[] aSslEnabledProtocols) Sets the enabled SSL protocols.voidsetSSLEnabledProtocols(String aSslEnabledProtocols) Sets the optional SSL enabled protocols using a space delimited list of protocols.voidsetSSLEnabledProtocols(String[] aSslEnabledProtocols) Sets the optional SSL enabled protocolsStringarray.voidsetSslProtocol(String aSslProtocol) Sets the SSL ProtocolString.voidsetSslServerEKUs(List<String> serverEKUs) Sets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the server certificate.voidsetSslServerEKUsFromPropValue(String aServerEKUPropValue) Sets the list of trusted X.509 Extended Key Usage (EKU) values from an EPP configuration property value, where at least one of the values must exist in the server certificate.voidsetTrustStore(String aTrustStoreType, String aTrustStoreFileName, String aTrustStorePassPhrase) Sets the required Trust Store properties if the Trust Store is explicitely set.voidsetTrustStoreFileName(String aTrustStoreFileName) Sets the Trust Store File NameString.voidsetTrustStorePassPhrase(String aTrustStorePassPhrase) Sets the Trust Store Pass PhraseString.voidsetTrustStoreType(String aTrustStoreType) Sets the Trust Store TypeString.toString()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 Details
-
EPPSSLConfig
public EPPSSLConfig()Default constructor. -
EPPSSLConfig
public EPPSSLConfig(String aSslProtocol, String aIdentityStoreType, String aIdentityFileName, 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 Details
-
getIdentityFileName
Gets the Identity File NameString.- Returns:
Stringif set;nullotherwise.
-
setIdentityFileName
Sets the Identity File NameString.- Parameters:
aIdentityFileName-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
Sets the Identity Key Pass PhraseString.- Parameters:
aIdentityKeyPassPhrase-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
Sets the Identity Pass PhraseString.- Parameters:
aIdentityPassPhrase-String.
-
getIdentityStoreType
Gets the Identity Store TypeString.- Returns:
Stringif set;nullotherwise.
-
setIdentityStoreType
Sets the Identity Store TypeString.- Parameters:
aIdentityStoreType-String.
-
getSslDebug
Gets the SSL DebugString.- Returns:
Stringif set;nullotherwise.
-
setSslDebug
Sets the SSL DebugString.- Parameters:
aSslDebug-String.
-
getSslProtocol
Gets the SSL ProtocolString.- Returns:
Stringif set;nullotherwise.
-
setSslProtocol
Sets the SSL ProtocolString.- Parameters:
aSslProtocol-String.
-
setTrustStore
public void setTrustStore(String aTrustStoreType, String aTrustStoreFileName, 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
Gets the Trust Store TypeString.- Returns:
Stringif set;nullotherwise.
-
setTrustStoreType
Sets the Trust Store TypeString.- Parameters:
aTrustStoreType-String.
-
getTrustStoreFileName
Gets the Trust Store File NameString.- Returns:
Stringif set;nullotherwise.
-
setTrustStoreFileName
Sets the Trust Store File NameString.- Parameters:
aTrustStoreFileName-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
Sets the Trust Store Pass PhraseString.- Parameters:
aTrustStorePassPhrase-String.
-
getSSLEnabledProtocols
Gets the optional SSL enabled protocolsStringarray.- Returns:
Stringarray if set;nullotherwise.
-
setSSLEnabledProtocols
Sets the optional SSL enabled protocolsStringarray.- Parameters:
aSslEnabledProtocols-Stringarray of enabled SSL protocols
-
setSSLEnabledProtocols
Sets the optional SSL enabled protocols using a space delimited list of protocols.- Parameters:
aSslEnabledProtocols- space delimited list of enabled SSL protocols
-
getSSLEnabledCipherSuites
Gets the optional SSL enabled cipher suitesStringarray.- Returns:
>Stringarray if set;nullotherwise.
-
setSSLEnabledCipherSuites
Sets the optional SSL enabled cipher suitesStringarray.- Parameters:
aSslEnabledCipherSuites-Stringarray of enabled SSL cipher suites
-
setSSLEnabledCipherSuites
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
Validates the properties of theEPPSSLConfigby checking that the required properties are set.- Throws:
EPPException- On error
-
toString
Output the contents of theEPPSSLConfiginstance which includes a comma seperated list ofEPPSSLConfigproperties with the values. For example, "sslProtocol = <value>". -
getSslEnabledProtocols
Gets the enabled SSL protocols.- Returns:
- enabled SSL protocols if set;
nullotherwise
-
setSslEnabledProtocols
Sets the enabled SSL protocols.- Parameters:
aSslEnabledProtocols- The enabled SSL protocols
-
getSslEnabledCipherSuites
Gets the enabled SSL cipher suites.- Returns:
- enabled SSL cipher suites if set;
nullotherwise
-
setSslEnabledCipherSuites
Sets the enabled SSL cipher suites.- Parameters:
aSslEnabledCipherSuites- the enabled SSL cipehr suites
-
isSSLDisableHostnameVerification
public boolean isSSLDisableHostnameVerification()Disable host name verification? This should only be set totruein Development and is set by default tofalse.- Returns:
trueto disable host name verification of the server certificate;falseotherwise
-
setSSLDisableHostnameVerification
public void setSSLDisableHostnameVerification(boolean aDisableHostnameVerification) Sets the disable host name verification property, which defaults tofalseand should only be set totruein Development.- Parameters:
aDisableHostnameVerification- Disable the host name verification?
-
isSslDisableHostnameVerification
public boolean isSslDisableHostnameVerification()is host name verification disabled, which should only be used in Development.- Returns:
- the sslDisableHostnameVerification
-
setSslDisableHostnameVerification
public void setSslDisableHostnameVerification(boolean sslDisableHostnameVerification) Disable host name verification, which should only be used in Development.- Parameters:
sslDisableHostnameVerification- the sslDisableHostnameVerification to set
-
getSslServerEKUs
Gets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the server certificate. Anullvalue means that the EKU values in the server certificate will be ignored. These values are The values are integer values, as defined in the PKIX Extended Key Purpose registry.- Returns:
- the trust server EKU values or
nullto ignore the EKU settings
-
setSslClientEKUs
Sets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the client certificate. Anullvalue means that the EKU values in the client certificate will be ignored. These values are The values are integer values, as defined in the PKIX Extended Key Purpose registry.- Parameters:
clientEKUs- Set to a list of EKU Object Identifier (OID) values ornullto ignore the EKU extension
-
setSslClientEKUsFromPropValue
Sets the list of trusted X.509 Extended Key Usage (EKU) values from an EPP configuration property value, where at least one of the values must exist in the client certificate. Anullvalue means that the EKU values in the client certificate will be ignored. These values are The values are integer values, as defined in the PKIX Extended Key Purpose registry.- Parameters:
aClientEKUPropValue- EPP configuration property value to use to load the client EKUs
-
getSslClientEKUs
Gets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the client certificate. Anullvalue means that the EKU values in the client certificate will be ignored. These values are The values are integer values, as defined in the PKIX Extended Key Purpose registry.- Returns:
- the trusted client EKU values or
nullto ignore the EKU settings
-
setSslServerEKUs
Sets the list of trusted X.509 Extended Key Usage (EKU) values, where at least one of the values must exist in the server certificate. Anullvalue means that the EKU values in the server certificate will be ignored. These values are The values are integer values, as defined in the PKIX Extended Key Purpose registry.- Parameters:
serverEKUs- Set to a list of EKU Object Identifier (OID) values ornullto ignore the EKU extension
-
setSslServerEKUsFromPropValue
Sets the list of trusted X.509 Extended Key Usage (EKU) values from an EPP configuration property value, where at least one of the values must exist in the server certificate. Anullvalue means that the EKU values in the server certificate will be ignored. These values are The values are integer values, as defined in the PKIX Extended Key Purpose registry.- Parameters:
aServerEKUPropValue- EPP configuration property value to use to load the server EKUs
-