public abstract class AbstractSSLContextInitializer extends Object implements SSLContextInitializer
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger
Logger for this class.
|
protected TrustManager[] |
trustManagers
Trust managers.
|
Constructor and Description |
---|
AbstractSSLContextInitializer() |
Modifier and Type | Method and Description |
---|---|
protected TrustManager[] |
aggregateTrustManagers(TrustManager... managers)
Creates an
AggregateTrustManager containing the supplied trust managers. |
protected abstract TrustManager[] |
createTrustManagers()
Creates any trust managers specific to this context initializer.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyManagers
protected final org.slf4j.Logger logger
protected TrustManager[] trustManagers
public TrustManager[] getTrustManagers() throws GeneralSecurityException
SSLContextInitializer
getTrustManagers
in interface SSLContextInitializer
GeneralSecurityException
- if an errors occurs while loading the TrustManagerspublic void setTrustManagers(TrustManager... managers)
setTrustManagers
in interface SSLContextInitializer
managers
- trust managersprotected abstract TrustManager[] createTrustManagers() throws GeneralSecurityException
GeneralSecurityException
- if an errors occurs while loading the TrustManagerspublic SSLContext initSSLContext(String protocol) throws GeneralSecurityException
SSLContextInitializer
initSSLContext
in interface SSLContextInitializer
protocol
- type to use for SSLGeneralSecurityException
- if the SSLContext cannot be createdprotected TrustManager[] aggregateTrustManagers(TrustManager... managers)
AggregateTrustManager
containing the supplied trust managers.managers
- to aggregateCopyright © 2021. All rights reserved.