Class TlsServerAddressHolder
java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.config.ServerAddressHolder
de.iip_ecosphere.platform.support.iip_aas.config.TlsServerAddressHolder
- Direct Known Subclasses:
EndpointHolder,ProtocolAddressHolder
A proxy for
ServerAddress with a protocol, as we do not want to have setters there.- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance (deserialization).Creates an instance by copying data from a given instance.TlsServerAddressHolder(de.iip_ecosphere.platform.support.Schema schema, String host, int port) Creates an instance for unencrypted communication.TlsServerAddressHolder(de.iip_ecosphere.platform.support.ServerAddress addr) Creates an instance from a given instance for unencrypted communication (serialization). -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether a SSL client shall use the keystore or rely on the default certificate chain.booleanReturns whether SSL hostname verification shall be enabled or not.Returns the alias denoting the key to use.Returns the password for the optional TLS keystore.Returns the optional TLS keystore.de.iip_ecosphere.platform.support.net.KeyStoreDescriptorReturns a keystore descriptor representing the keystore information.Returns the keystore key, which, via theIdentityStoremay replacegetKeystore()andgetKeyPassword().voidsetAppliesToClient(boolean appliesToClient) Defines whether a SSL client shall use the keytore or rely on the default certificate chain.voidsetHostnameVerification(boolean hostnameVerification) Defines whether SSL hostname verification shall be enabled or not.voidsetKeyAlias(String alias) Changes the alias denoting the key to use.voidsetKeyPassword(String keyPassword) Defines the password for the optional TLS keystore.voidsetKeystore(File keystore) Defines the optional TLS keystore.voidsetKeystoreKey(String keystoreKey) Defines the keystore key, which, via theIdentityStoremay replacegetKeystore()andgetKeyPassword().Methods inherited from class de.iip_ecosphere.platform.support.iip_aas.config.ServerAddressHolder
getHost, getPort, getSchema, getServerAddress, isEphmemeral, isRunning, serverAddressFromJson, setHost, setPort, setRunning, setSchema, toJson
-
Field Details
-
keystore
-
keyPassword
-
keystoreKey
-
keyAlias
-
appliesToClient
private boolean appliesToClient -
hostnameVerification
private boolean hostnameVerification
-
-
Constructor Details
-
TlsServerAddressHolder
public TlsServerAddressHolder()Creates an instance (deserialization). -
TlsServerAddressHolder
public TlsServerAddressHolder(de.iip_ecosphere.platform.support.Schema schema, String host, int port) Creates an instance for unencrypted communication.- Parameters:
schema- the schemahost- the host nameport- the port
-
TlsServerAddressHolder
public TlsServerAddressHolder(de.iip_ecosphere.platform.support.ServerAddress addr) Creates an instance from a given instance for unencrypted communication (serialization).- Parameters:
addr- the instance to take data from
-
TlsServerAddressHolder
Creates an instance by copying data from a given instance.- Parameters:
holder- the holder to copy from
-
-
Method Details
-
getKeystore
Returns the optional TLS keystore.- Returns:
- the TLS keystore (suffix ".jks" points to Java Key store, suffix ".p12" to PKCS12 keystore), may be null for none
-
getKeyPassword
Returns the password for the optional TLS keystore.- Returns:
- the TLS keystore, may be null for none
-
getKeystoreKey
Returns the keystore key, which, via theIdentityStoremay replacegetKeystore()andgetKeyPassword().- Returns:
- the keystore key, may be null for none
-
getKeyAlias
Returns the alias denoting the key to use.- Returns:
- the alias, may be null for none/first match
-
getAppliesToClient
public boolean getAppliesToClient()Returns whether a SSL client shall use the keystore or rely on the default certificate chain.- Returns:
truefor keystore (default),falseelse for default chain
-
getHostnameVerification
public boolean getHostnameVerification()Returns whether SSL hostname verification shall be enabled or not. May not be applied to every HTTP client.- Returns:
truefor enabled,falseelse
-
setKeystore
Defines the optional TLS keystore. [required by data mapper]- Parameters:
keystore- the TLS keystore (suffix ".jks" points to Java Key store, suffix ".p12" to PKCS12 keystore), may be null for none
-
setKeyPassword
Defines the password for the optional TLS keystore. [required by data mapper]- Parameters:
keyPassword- the TLS keystore, may be null for none
-
setKeystoreKey
Defines the keystore key, which, via theIdentityStoremay replacegetKeystore()andgetKeyPassword(). [required by data mapper]- Parameters:
keystoreKey- the keystore key, may be null for none
-
setKeyAlias
Changes the alias denoting the key to use. [required by data mapper]- Parameters:
alias- the alias, may be null for none/first match
-
setAppliesToClient
public void setAppliesToClient(boolean appliesToClient) Defines whether a SSL client shall use the keytore or rely on the default certificate chain. [required by data mapper]- Parameters:
appliesToClient-truefor keystore (default),falseelse for default chain
-
setHostnameVerification
public void setHostnameVerification(boolean hostnameVerification) Defines whether SSL hostname verification shall be enabled or not. May not be applied to every HTTP client. [required by data mapper]- Parameters:
hostnameVerification-truefor enabled,falseelse
-
getKeystoreDescriptor
public de.iip_ecosphere.platform.support.net.KeyStoreDescriptor getKeystoreDescriptor()Returns a keystore descriptor representing the keystore information.- Returns:
- the keystore descriptor, may be null if
keystoreis null
-