Package org.kiwiproject.security
Interface TrustStoreConfigProvider
- All Known Subinterfaces:
KeyAndTrustStoreConfigProvider
- All Known Implementing Classes:
SecureEndpointsConfiguration,SSLContextConfiguration,TlsContextConfiguration
public interface TrustStoreConfigProvider
Defines a configuration interface for properties needed to create trust stores, and a contract to be able to create
a
SSLContext and SSLSocketFactory from this configuration.-
Method Summary
Modifier and TypeMethodDescriptionThe protocol to use.The trust store password (plain text).The path to the trust store.default StringTrust store type.default booleanDefaults totrue.default SSLContextConvert this configuration into aSSLContext.default SSLSocketFactoryConvert this configuration into aSSLSocketFactory.
-
Method Details
-
getProtocol
String getProtocol()The protocol to use. Consider usingSSLContextProtocolto ensure valid protocols.- Returns:
- protocol
- See Also:
-
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
Trust store type. Default is JKS.- Returns:
- trust store type
- See Also:
-
isVerifyHostname
default boolean isVerifyHostname()Defaults totrue.- Returns:
- true if hostname verification should be performed
-
toSSLContext
Convert this configuration into aSSLContext.- Returns:
- a new SSLContext instance
- See Also:
-
toSslSocketFactory
Convert this configuration into aSSLSocketFactory.- Returns:
- a new SSLSocketFactory instance
- See Also:
-