edu.vt.middleware.ldap.ssl
public class X509SSLContextInitializer extends AbstractSSLContextInitializer
SSLContextInitializer
which can use X509 certificates
to create key and trust managers.logger
Constructor and Description |
---|
X509SSLContextInitializer() |
Modifier and Type | Method and Description |
---|---|
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.
|
javax.net.ssl.TrustManager[] |
getTrustManagers()
Returns the trust managers used when creating SSL contexts.
|
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.
|
initSSLContext
public java.security.cert.X509Certificate[] getTrustCertificates()
X509Certificates[]
public void setTrustCertificates(java.security.cert.X509Certificate[] certs)
certs
- X509Certificates[]
public java.security.cert.X509Certificate getAuthenticationCertificate()
X509Certificate
public void setAuthenticationCertificate(java.security.cert.X509Certificate cert)
cert
- X509Certificate
public java.security.PrivateKey getAuthenticationKey()
PrivateKey
public void setAuthenticationKey(java.security.PrivateKey key)
key
- PrivateKey
public javax.net.ssl.TrustManager[] getTrustManagers() throws java.security.GeneralSecurityException
getTrustManagers
in interface SSLContextInitializer
getTrustManagers
in class AbstractSSLContextInitializer
TrustManager[]
java.security.GeneralSecurityException
- if an errors occurs while loading the
TrustManagerspublic javax.net.ssl.KeyManager[] getKeyManagers() throws java.security.GeneralSecurityException
getKeyManagers
in interface SSLContextInitializer
getKeyManagers
in class AbstractSSLContextInitializer
KeyManagers[]
java.security.GeneralSecurityException
- if an errors occurs while loading the
KeyManagersCopyright © 2014. All Rights Reserved.