Package edu.vt.middleware.ldap.ssl
Class X509SSLContextInitializer
- java.lang.Object
-
- edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
-
- edu.vt.middleware.ldap.ssl.X509SSLContextInitializer
-
- All Implemented Interfaces:
SSLContextInitializer
public class X509SSLContextInitializer extends AbstractSSLContextInitializer
Provides aSSLContextInitializer
which can use X509 certificates to create key and trust managers.- Version:
- $Revision: 1106 $ $Date: 2010-01-29 23:34:13 -0500 (Fri, 29 Jan 2010) $
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
logger
-
-
Constructor Summary
Constructors Constructor Description X509SSLContextInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class edu.vt.middleware.ldap.ssl.AbstractSSLContextInitializer
initSSLContext
-
-
-
-
Method Detail
-
getTrustCertificates
public java.security.cert.X509Certificate[] getTrustCertificates()
Returns the certificates to use for creating the trust managers.- Returns:
X509Certificates[]
-
setTrustCertificates
public void setTrustCertificates(java.security.cert.X509Certificate[] certs)
Sets the certificates to use for creating the trust managers.- Parameters:
certs
-X509Certificates[]
-
getAuthenticationCertificate
public java.security.cert.X509Certificate getAuthenticationCertificate()
Returns the certificate to use for creating the key managers.- Returns:
X509Certificate
-
setAuthenticationCertificate
public void setAuthenticationCertificate(java.security.cert.X509Certificate cert)
Sets the certificate to use for creating the key managers.- Parameters:
cert
-X509Certificate
-
getAuthenticationKey
public java.security.PrivateKey getAuthenticationKey()
Returns the private key associated with the authentication certificate.- Returns:
PrivateKey
-
setAuthenticationKey
public void setAuthenticationKey(java.security.PrivateKey key)
Sets the private key associated with the authentication certificate.- Parameters:
key
-PrivateKey
-
getTrustManagers
public javax.net.ssl.TrustManager[] getTrustManagers() throws java.security.GeneralSecurityException
Returns the trust managers used when creating SSL contexts.- Specified by:
getTrustManagers
in interfaceSSLContextInitializer
- Specified by:
getTrustManagers
in classAbstractSSLContextInitializer
- Returns:
TrustManager[]
- Throws:
java.security.GeneralSecurityException
- if an errors occurs while loading the TrustManagers
-
getKeyManagers
public javax.net.ssl.KeyManager[] getKeyManagers() throws java.security.GeneralSecurityException
Returns the key managers used when creating SSL contexts.- Specified by:
getKeyManagers
in interfaceSSLContextInitializer
- Specified by:
getKeyManagers
in classAbstractSSLContextInitializer
- Returns:
KeyManagers[]
- Throws:
java.security.GeneralSecurityException
- if an errors occurs while loading the KeyManagers
-
-