Package org.kiwiproject.security
Interface TrustStoreConfigProvider
-
- All Known Subinterfaces:
KeyAndTrustStoreConfigProvider
- All Known Implementing Classes:
SecureEndpointsConfiguration,SSLContextConfiguration,TlsContextConfiguration
public interface TrustStoreConfigProviderDefines a configuration interface for properties needed to create trust stores, and a contract to be able to create aSSLContextandSSLSocketFactoryfrom this configuration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringgetProtocol()The protocol to use.StringgetTrustStorePassword()The trust store password (plain text).StringgetTrustStorePath()The path to the trust store.default StringgetTrustStoreType()Trust store type.default booleanisVerifyHostname()Defaults totrue.default SSLContexttoSSLContext()Convert this configuration into aSSLContext.default SSLSocketFactorytoSslSocketFactory()Convert this configuration into aSSLSocketFactory.
-
-
-
Method Detail
-
getProtocol
String getProtocol()
The protocol to use. Consider usingSSLContextProtocolto ensure valid protocols.- Returns:
- protocol
- See Also:
SSLContextProtocol
-
getTrustStorePath
String getTrustStorePath()
The path to the trust store.- Returns:
- path to trust store
-
getTrustStorePassword
String getTrustStorePassword()
The trust store password (plain text).- Returns:
- trust store password
-
getTrustStoreType
default String getTrustStoreType()
Trust store type. Default is JKS.- Returns:
- trust store type
- See Also:
KeyStoreType.JKS
-
isVerifyHostname
default boolean isVerifyHostname()
Defaults totrue.- Returns:
- true if hostname verification should be performed
-
toSSLContext
default SSLContext toSSLContext()
Convert this configuration into aSSLContext.- Returns:
- a new SSLContext instance
- See Also:
KiwiSecurity.createSslContext(String, String, String, String, String, String, String)
-
toSslSocketFactory
default SSLSocketFactory toSslSocketFactory()
Convert this configuration into aSSLSocketFactory.- Returns:
- a new SSLSocketFactory instance
- See Also:
toSSLContext()
-
-