Class SSLServerConfiguration
- java.lang.Object
-
- com.github.toolarium.jwebserver.config.SSLServerConfiguration
-
- All Implemented Interfaces:
ISSLServerConfiguration,java.io.Serializable
public class SSLServerConfiguration extends java.lang.Object implements ISSLServerConfiguration, java.io.Serializable
Implements theISSLServerConfiguration.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SSLServerConfiguration()Constructor for SSLServerConfiguration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetKeyStoreAlias()Get the key store aliasjava.lang.StringgetKeyStoreFile()Get the key store file or null to use a self signed certificatecom.github.toolarium.common.security.ISecuredValue<java.lang.String>getKeyStorePassword()Get the key store passwordjava.lang.StringgetKeyStoreType()Get the key store typecom.github.toolarium.security.keystore.ISecurityManagerProvidergetSecurityManagerProvider()Get the security manager providerjavax.net.ssl.SSLContextgetSSLContext()Get the SSL contextjava.lang.StringgetTrustKeyStoreFile()Get the trust key store file or null to use defaultinthashCode()SSLServerConfigurationsetKeyStoreAlias(java.lang.String keyStoreAlias)Set the key store aliasSSLServerConfigurationsetKeyStoreFile(java.lang.String keyStoreFile)Set the key store fileSSLServerConfigurationsetKeyStorePassword(com.github.toolarium.common.security.ISecuredValue<java.lang.String> keyStorePassword)Set the key store passwordSSLServerConfigurationsetKeyStoreType(java.lang.String keysStoreType)Set the key store typeSSLServerConfigurationsetTrustAnyCertificate(java.lang.Boolean trustAnyCertificate)Set the trust any certificateSSLServerConfigurationsetTrustKeyStoreFile(java.lang.String trustKeyStoreFile)Set the trust key store filejava.lang.StringtoString()java.lang.BooleantrustAnyCertificate()Check if server trust any certificate
-
-
-
Method Detail
-
trustAnyCertificate
public java.lang.Boolean trustAnyCertificate()
Description copied from interface:ISSLServerConfigurationCheck if server trust any certificate- Specified by:
trustAnyCertificatein interfaceISSLServerConfiguration- Returns:
- true to trust any certificate
- See Also:
ISSLServerConfiguration.trustAnyCertificate()
-
setTrustAnyCertificate
public SSLServerConfiguration setTrustAnyCertificate(java.lang.Boolean trustAnyCertificate)
Set the trust any certificate- Parameters:
trustAnyCertificate- the trust any certificate- Returns:
- this instance
-
getTrustKeyStoreFile
public java.lang.String getTrustKeyStoreFile()
Description copied from interface:ISSLServerConfigurationGet the trust key store file or null to use default- Specified by:
getTrustKeyStoreFilein interfaceISSLServerConfiguration- Returns:
- the trust key store file
- See Also:
ISSLServerConfiguration.getTrustKeyStoreFile()
-
setTrustKeyStoreFile
public SSLServerConfiguration setTrustKeyStoreFile(java.lang.String trustKeyStoreFile)
Set the trust key store file- Parameters:
trustKeyStoreFile- the trust key store file- Returns:
- this instance
-
getKeyStoreFile
public java.lang.String getKeyStoreFile()
Description copied from interface:ISSLServerConfigurationGet the key store file or null to use a self signed certificate- Specified by:
getKeyStoreFilein interfaceISSLServerConfiguration- Returns:
- the key store file
- See Also:
ISSLServerConfiguration.getKeyStoreFile()
-
setKeyStoreFile
public SSLServerConfiguration setKeyStoreFile(java.lang.String keyStoreFile)
Set the key store file- Parameters:
keyStoreFile- the key store file- Returns:
- this instance
-
getKeyStoreAlias
public java.lang.String getKeyStoreAlias()
Description copied from interface:ISSLServerConfigurationGet the key store alias- Specified by:
getKeyStoreAliasin interfaceISSLServerConfiguration- Returns:
- the key store alias
- See Also:
ISSLServerConfiguration.getKeyStoreAlias()
-
setKeyStoreAlias
public SSLServerConfiguration setKeyStoreAlias(java.lang.String keyStoreAlias)
Set the key store alias- Parameters:
keyStoreAlias- the key store alias- Returns:
- this instance
-
getKeyStorePassword
public com.github.toolarium.common.security.ISecuredValue<java.lang.String> getKeyStorePassword()
Description copied from interface:ISSLServerConfigurationGet the key store password- Specified by:
getKeyStorePasswordin interfaceISSLServerConfiguration- Returns:
- the key store password
- See Also:
ISSLServerConfiguration.getKeyStorePassword()
-
setKeyStorePassword
public SSLServerConfiguration setKeyStorePassword(com.github.toolarium.common.security.ISecuredValue<java.lang.String> keyStorePassword)
Set the key store password- Parameters:
keyStorePassword- the key store password- Returns:
- this instance
-
getKeyStoreType
public java.lang.String getKeyStoreType()
Description copied from interface:ISSLServerConfigurationGet the key store type- Specified by:
getKeyStoreTypein interfaceISSLServerConfiguration- Returns:
- the key store type
- See Also:
ISSLServerConfiguration.getKeyStoreType()
-
setKeyStoreType
public SSLServerConfiguration setKeyStoreType(java.lang.String keysStoreType)
Set the key store type- Parameters:
keysStoreType- the key store type- Returns:
- this instance
-
getSSLContext
public javax.net.ssl.SSLContext getSSLContext() throws java.security.GeneralSecurityException, java.io.IOExceptionDescription copied from interface:ISSLServerConfigurationGet the SSL context- Specified by:
getSSLContextin interfaceISSLServerConfiguration- Returns:
- the ssl context or null
- Throws:
java.security.GeneralSecurityException- In case a self-signbed certificate can't be createdjava.io.IOException- In case a file can't be accessed- See Also:
ISSLServerConfiguration.getSSLContext()
-
getSecurityManagerProvider
public com.github.toolarium.security.keystore.ISecurityManagerProvider getSecurityManagerProvider() throws java.security.GeneralSecurityException, java.io.IOExceptionGet the security manager provider- Returns:
- the security manager provider
- Throws:
java.io.IOException- In case a file can't be accessedjava.security.GeneralSecurityException- In case a self-signbed certificate can't be created
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-