public class X509SSLContextInitializer extends AbstractSSLContextInitializer
| Modifier and Type | Field and Description |
|---|---|
private java.security.cert.X509Certificate |
authenticationCert
Certificate used to create key managers.
|
private java.security.PrivateKey |
authenticationKey
Private key used to create key managers.
|
private java.security.cert.X509Certificate[] |
trustCerts
Certificates used to create trust managers.
|
logger, trustManagers| Constructor and Description |
|---|
X509SSLContextInitializer() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.net.ssl.TrustManager[] |
createTrustManagers()
Creates any trust managers specific to this context initializer.
|
java.security.cert.X509Certificate |
getAuthenticationCertificate()
Returns the certificate to use for creating the key managers.
|
java.security.PrivateKey |
getAuthenticationKey()
Returns the private key associated with the authentication certificate.
|
javax.net.ssl.KeyManager[] |
getKeyManagers()
Returns the key managers used when creating SSL contexts.
|
java.security.cert.X509Certificate[] |
getTrustCertificates()
Returns the certificates to use for creating the trust managers.
|
void |
setAuthenticationCertificate(java.security.cert.X509Certificate cert)
Sets the certificate to use for creating the key managers.
|
void |
setAuthenticationKey(java.security.PrivateKey key)
Sets the private key associated with the authentication certificate.
|
void |
setTrustCertificates(java.security.cert.X509Certificate... certs)
Sets the certificates to use for creating the trust managers.
|
java.lang.String |
toString() |
aggregateTrustManagers, getTrustManagers, initSSLContext, setTrustManagersprivate java.security.cert.X509Certificate[] trustCerts
private java.security.cert.X509Certificate authenticationCert
private java.security.PrivateKey authenticationKey
public java.security.cert.X509Certificate[] getTrustCertificates()
public void setTrustCertificates(java.security.cert.X509Certificate... certs)
certs - X.509 certificatespublic java.security.cert.X509Certificate getAuthenticationCertificate()
public void setAuthenticationCertificate(java.security.cert.X509Certificate cert)
cert - X.509 certificatepublic java.security.PrivateKey getAuthenticationKey()
public void setAuthenticationKey(java.security.PrivateKey key)
key - private keyprotected javax.net.ssl.TrustManager[] createTrustManagers()
throws java.security.GeneralSecurityException
AbstractSSLContextInitializercreateTrustManagers in class AbstractSSLContextInitializerjava.security.GeneralSecurityException - if an errors occurs while loading the TrustManagerspublic javax.net.ssl.KeyManager[] getKeyManagers()
throws java.security.GeneralSecurityException
SSLContextInitializerjava.security.GeneralSecurityException - if an errors occurs while loading the KeyManagerspublic java.lang.String toString()
toString in class java.lang.Object