public abstract class AbstractSSLContextInitializer extends Object implements SSLContextInitializer
| Modifier and Type | Field and Description |
|---|---|
protected HostnameVerifierConfig |
hostnameVerifierConfig
Hostname verifier config.
|
protected 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.
|
HostnameVerifierConfig |
getHostnameVerifierConfig()
Returns the hostname verifier config used when created 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 |
setHostnameVerifierConfig(HostnameVerifierConfig config)
Sets the hostname verifier config.
|
void |
setTrustManagers(TrustManager... managers)
Sets the trust managers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeyManagersprotected final Logger logger
protected TrustManager[] trustManagers
protected HostnameVerifierConfig hostnameVerifierConfig
public TrustManager[] getTrustManagers() throws GeneralSecurityException
SSLContextInitializergetTrustManagers in interface SSLContextInitializerGeneralSecurityException - if an errors occurs while loading the TrustManagerspublic void setTrustManagers(TrustManager... managers)
SSLContextInitializersetTrustManagers in interface SSLContextInitializermanagers - trust managerspublic HostnameVerifierConfig getHostnameVerifierConfig()
SSLContextInitializergetHostnameVerifierConfig in interface SSLContextInitializerpublic void setHostnameVerifierConfig(HostnameVerifierConfig config)
SSLContextInitializersetHostnameVerifierConfig in interface SSLContextInitializerconfig - hostname verifier configprotected abstract TrustManager[] createTrustManagers() throws GeneralSecurityException
GeneralSecurityException - if an errors occurs while loading the TrustManagerspublic SSLContext initSSLContext(String protocol) throws GeneralSecurityException
SSLContextInitializerinitSSLContext in interface SSLContextInitializerprotocol - type to use for SSLGeneralSecurityException - if the SSLContext cannot be createdprotected TrustManager[] aggregateTrustManagers(TrustManager... managers)
AggregateTrustManager containing the supplied trust managers.managers - to aggregateCopyright © 2003-2019 Virginia Tech. All Rights Reserved.