Class SSLHostConfigPreSharedKey

java.lang.Object
org.apache.tomcat.util.net.SSLHostConfigPreSharedKey
All Implemented Interfaces:
Serializable

public class SSLHostConfigPreSharedKey extends Object implements Serializable
Represents a pre-shared key configuration for a virtual host.
See Also:
  • Constructor Details

    • SSLHostConfigPreSharedKey

      public SSLHostConfigPreSharedKey()
      Creates a new pre-shared key configuration with default settings.
    • SSLHostConfigPreSharedKey

      public SSLHostConfigPreSharedKey(SSLHostConfig sslHostConfig)
      Creates a new pre-shared key configuration for the given host.
      Parameters:
      sslHostConfig - the parent SSL host configuration
  • Method Details

    • getSSLHostConfig

      public SSLHostConfig getSSLHostConfig()
      Returns the SSLHostConfig that owns this pre-shared key configuration.
      Returns:
      the parent SSLHostConfig
    • getIdentity

      public String getIdentity()
      Returns the identity associated with the pre-shared key.
      Returns:
      the pre-shared key identity
    • setIdentity

      public void setIdentity(String identity)
      Sets the identity associated with the pre-shared key.
      Parameters:
      identity - the pre-shared key identity
    • getKey

      public String getKey()
      Returns the pre-shared key as a hexadecimal string.
      Returns:
      the hexadecimal pre-shared key
    • setKey

      public void setKey(String key)
      Sets the pre-shared key from a hexadecimal string.
      Parameters:
      key - the hexadecimal pre-shared key
      Throws:
      IllegalArgumentException - if the key is not valid hexadecimal
    • getKeyInternal

      public byte[] getKeyInternal()
      Returns the pre-shared key.
      Returns:
      the pre-shared key
    • getDigest

      public String getDigest()
      Returns the message digest algorithm name.
      Returns:
      the message digest algorithm name
    • setDigest

      public void setDigest(String digest)
      Sets the message digest algorithm.
      Parameters:
      digest - the message digest name
      Throws:
      IllegalArgumentException - if the message digest is not recognized
    • getDigestInternal

      public MessageDigest getDigestInternal()
      Returns the message digest.
      Returns:
      the message digest