Package edu.vt.middleware.ldap.ssl
Class X509CredentialConfig
- java.lang.Object
-
- edu.vt.middleware.ldap.ssl.X509CredentialConfig
-
- All Implemented Interfaces:
CredentialConfig
public class X509CredentialConfig extends java.lang.Object implements CredentialConfig
Provides the properties necessary for creating an SSL context initializer with aX509CredentialReader
.- Version:
- $Revision: 1106 $ $Date: 2010-01-29 23:34:13 -0500 (Fri, 29 Jan 2010) $
- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected X509CertificateCredentialReader
certReader
Reads X.509 certificate credential.protected X509CertificatesCredentialReader
certsReader
Reads X.509 certificates credential.protected PrivateKeyCredentialReader
keyReader
Reads private key credential.
-
Constructor Summary
Constructors Constructor Description X509CredentialConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSLContextInitializer
createSSLContextInitializer()
Creates anSSLContextInitializer
using the configured trust and authentication material in this config.java.lang.String
getAuthenticationCertificate()
This returns the name of the authentication certificate to use.java.lang.String
getAuthenticationKey()
This returns the name of the authentication key to use.java.lang.String
getTrustCertificates()
This returns the name of the trust certificates to use.void
setAuthenticationCertificate(java.lang.String s)
This sets the name of the authentication certificate to use.void
setAuthenticationKey(java.lang.String s)
This sets the name of the authentication key to use.void
setTrustCertificates(java.lang.String s)
This sets the name of the trust certificates to use.
-
-
-
Field Detail
-
certsReader
protected X509CertificatesCredentialReader certsReader
Reads X.509 certificates credential.
-
certReader
protected X509CertificateCredentialReader certReader
Reads X.509 certificate credential.
-
keyReader
protected PrivateKeyCredentialReader keyReader
Reads private key credential.
-
-
Method Detail
-
getTrustCertificates
public java.lang.String getTrustCertificates()
This returns the name of the trust certificates to use.- Returns:
String
trust certificates name
-
setTrustCertificates
public void setTrustCertificates(java.lang.String s)
This sets the name of the trust certificates to use.- Parameters:
s
-String
trust certificates name
-
getAuthenticationCertificate
public java.lang.String getAuthenticationCertificate()
This returns the name of the authentication certificate to use.- Returns:
String
authentication certificate name
-
setAuthenticationCertificate
public void setAuthenticationCertificate(java.lang.String s)
This sets the name of the authentication certificate to use.- Parameters:
s
-String
authentication certificate name
-
getAuthenticationKey
public java.lang.String getAuthenticationKey()
This returns the name of the authentication key to use.- Returns:
String
authentication key name
-
setAuthenticationKey
public void setAuthenticationKey(java.lang.String s)
This sets the name of the authentication key to use.- Parameters:
s
-String
authentication key name
-
createSSLContextInitializer
public SSLContextInitializer createSSLContextInitializer() throws java.security.GeneralSecurityException
Creates anSSLContextInitializer
using the configured trust and authentication material in this config.- Specified by:
createSSLContextInitializer
in interfaceCredentialConfig
- Returns:
SSLContextInitializer
- Throws:
java.security.GeneralSecurityException
- if the ssl context initializer cannot be created
-
-