Class SSLHostConfigPreSharedKey
java.lang.Object
org.apache.tomcat.util.net.SSLHostConfigPreSharedKey
- All Implemented Interfaces:
Serializable
Represents a pre-shared key configuration for a virtual host.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new pre-shared key configuration with default settings.SSLHostConfigPreSharedKey(SSLHostConfig sslHostConfig) Creates a new pre-shared key configuration for the given host. -
Method Summary
Modifier and TypeMethodDescriptionReturns the message digest algorithm name.Returns the message digest.Returns the identity associated with the pre-shared key.getKey()Returns the pre-shared key as a hexadecimal string.byte[]Returns the pre-shared key.Returns the SSLHostConfig that owns this pre-shared key configuration.voidSets the message digest algorithm.voidsetIdentity(String identity) Sets the identity associated with the pre-shared key.voidSets the pre-shared key from a hexadecimal string.
-
Constructor Details
-
SSLHostConfigPreSharedKey
public SSLHostConfigPreSharedKey()Creates a new pre-shared key configuration with default settings. -
SSLHostConfigPreSharedKey
Creates a new pre-shared key configuration for the given host.- Parameters:
sslHostConfig- the parent SSL host configuration
-
-
Method Details
-
getSSLHostConfig
Returns the SSLHostConfig that owns this pre-shared key configuration.- Returns:
- the parent SSLHostConfig
-
getIdentity
Returns the identity associated with the pre-shared key.- Returns:
- the pre-shared key identity
-
setIdentity
Sets the identity associated with the pre-shared key.- Parameters:
identity- the pre-shared key identity
-
getKey
Returns the pre-shared key as a hexadecimal string.- Returns:
- the hexadecimal pre-shared key
-
setKey
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
Returns the message digest algorithm name.- Returns:
- the message digest algorithm name
-
setDigest
Sets the message digest algorithm.- Parameters:
digest- the message digest name- Throws:
IllegalArgumentException- if the message digest is not recognized
-
getDigestInternal
-