public class X509SSLContextInitializer extends AbstractSSLContextInitializer
logger, trustManagers| Constructor and Description |
|---|
X509SSLContextInitializer() |
| Modifier and Type | Method and Description |
|---|---|
protected TrustManager[] |
createTrustManagers()
Creates any trust managers specific to this context initializer.
|
X509Certificate |
getAuthenticationCertificate()
Returns the certificate to use for creating the key managers.
|
PrivateKey |
getAuthenticationKey()
Returns the private key associated with the authentication certificate.
|
KeyManager[] |
getKeyManagers()
Returns the key managers used when creating SSL contexts.
|
X509Certificate[] |
getTrustCertificates()
Returns the certificates to use for creating the trust managers.
|
void |
setAuthenticationCertificate(X509Certificate cert)
Sets the certificate to use for creating the key managers.
|
void |
setAuthenticationKey(PrivateKey key)
Sets the private key associated with the authentication certificate.
|
void |
setTrustCertificates(X509Certificate... certs)
Sets the certificates to use for creating the trust managers.
|
String |
toString() |
aggregateTrustManagers, getTrustManagers, initSSLContext, setTrustManagerspublic X509Certificate[] getTrustCertificates()
public void setTrustCertificates(X509Certificate... certs)
certs - X.509 certificatespublic X509Certificate getAuthenticationCertificate()
public void setAuthenticationCertificate(X509Certificate cert)
cert - X.509 certificatepublic PrivateKey getAuthenticationKey()
public void setAuthenticationKey(PrivateKey key)
key - private keyprotected TrustManager[] createTrustManagers() throws GeneralSecurityException
AbstractSSLContextInitializercreateTrustManagers in class AbstractSSLContextInitializerGeneralSecurityException - if an errors occurs while loading the TrustManagerspublic KeyManager[] getKeyManagers() throws GeneralSecurityException
SSLContextInitializerGeneralSecurityException - if an errors occurs while loading the KeyManagersCopyright © 2023. All rights reserved.