Package org.ldaptive.ssl
Interface SSLContextInitializer
-
- All Known Implementing Classes:
AbstractSSLContextInitializer
,DefaultSSLContextInitializer
,KeyStoreSSLContextInitializer
,X509SSLContextInitializer
public interface SSLContextInitializer
Provides an interface for the initialization of new SSL contexts.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyManager[]
getKeyManagers()
Returns the key managers used when creating SSL contexts.TrustManager[]
getTrustManagers()
Returns the trust managers used when creating SSL contexts.SSLContext
initSSLContext(String protocol)
Creates an initialized SSLContext for the supplied protocol.void
setTrustManagers(TrustManager... managers)
Sets the trust managers.
-
-
-
Method Detail
-
initSSLContext
SSLContext initSSLContext(String protocol) throws GeneralSecurityException
Creates an initialized SSLContext for the supplied protocol.- Parameters:
protocol
- type to use for SSL- Returns:
- SSL context
- Throws:
GeneralSecurityException
- if the SSLContext cannot be created
-
getTrustManagers
TrustManager[] getTrustManagers() throws GeneralSecurityException
Returns the trust managers used when creating SSL contexts.- Returns:
- trust managers
- Throws:
GeneralSecurityException
- if an errors occurs while loading the TrustManagers
-
setTrustManagers
void setTrustManagers(TrustManager... managers)
Sets the trust managers. May be in isolation or in conjunction with other trust material.- Parameters:
managers
- trust managers
-
getKeyManagers
KeyManager[] getKeyManagers() throws GeneralSecurityException
Returns the key managers used when creating SSL contexts.- Returns:
- key managers
- Throws:
GeneralSecurityException
- if an errors occurs while loading the KeyManagers
-
-