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

public class TlsServerAddressHolder extends ServerAddressHolder
A proxy for ServerAddress with a protocol, as we do not want to have setters there.
Author:
Holger Eichelberger, SSE
  • Field Details

    • keystore

      private File keystore
    • keyPassword

      private String keyPassword
    • keystoreKey

      private String keystoreKey
    • keyAlias

      private String 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 schema
      host - the host name
      port - 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

      public TlsServerAddressHolder(TlsServerAddressHolder holder)
      Creates an instance by copying data from a given instance.
      Parameters:
      holder - the holder to copy from
  • Method Details

    • getKeystore

      public File 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

      public String getKeyPassword()
      Returns the password for the optional TLS keystore.
      Returns:
      the TLS keystore, may be null for none
    • getKeystoreKey

      public String getKeystoreKey()
      Returns the keystore key, which, via the IdentityStore may replace getKeystore() and getKeyPassword().
      Returns:
      the keystore key, may be null for none
    • getKeyAlias

      public String 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:
      true for keystore (default), false else 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:
      true for enabled, false else
    • setKeystore

      public void setKeystore(File keystore)
      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

      public void setKeyPassword(String keyPassword)
      Defines the password for the optional TLS keystore. [required by data mapper]
      Parameters:
      keyPassword - the TLS keystore, may be null for none
    • setKeystoreKey

      public void setKeystoreKey(String keystoreKey)
      Defines the keystore key, which, via the IdentityStore may replace getKeystore() and getKeyPassword(). [required by data mapper]
      Parameters:
      keystoreKey - the keystore key, may be null for none
    • setKeyAlias

      public void setKeyAlias(String alias)
      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 - true for keystore (default), false else 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 - true for enabled, false else
    • 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 keystore is null