Package org.ldaptive.ssl
Class X509CredentialConfig
- java.lang.Object
-
- org.ldaptive.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 an X.509 credential reader.- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
X509CredentialConfig.Builder
-
Constructor Summary
Constructors Constructor Description X509CredentialConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static X509CredentialConfig.Builder
builder()
Creates a builder for this class.SSLContextInitializer
createSSLContextInitializer()
Creates an SSL context initializer using the configured trust and authentication material in this config.boolean
equals(java.lang.Object o)
java.lang.String
getAuthenticationCertificate()
Returns the name of the authentication certificate to use.java.lang.String
getAuthenticationKey()
Returns the name of the authentication key to use.java.lang.String
getTrustCertificates()
Returns the name of the trust certificates to use.int
hashCode()
void
setAuthenticationCertificate(java.lang.String name)
Sets the name of the authentication certificate to use.void
setAuthenticationKey(java.lang.String name)
Sets the name of the authentication key to use.void
setTrustCertificates(java.lang.String name)
Sets the name of the trust certificates to use.java.lang.String
toString()
-
-
-
Method Detail
-
getTrustCertificates
public java.lang.String getTrustCertificates()
Returns the name of the trust certificates to use.- Returns:
- trust certificates name
-
setTrustCertificates
public void setTrustCertificates(java.lang.String name)
Sets the name of the trust certificates to use.- Parameters:
name
- trust certificates name
-
getAuthenticationCertificate
public java.lang.String getAuthenticationCertificate()
Returns the name of the authentication certificate to use.- Returns:
- authentication certificate name
-
setAuthenticationCertificate
public void setAuthenticationCertificate(java.lang.String name)
Sets the name of the authentication certificate to use.- Parameters:
name
- authentication certificate name
-
getAuthenticationKey
public java.lang.String getAuthenticationKey()
Returns the name of the authentication key to use.- Returns:
- authentication key name
-
setAuthenticationKey
public void setAuthenticationKey(java.lang.String name)
Sets the name of the authentication key to use.- Parameters:
name
- authentication key name
-
createSSLContextInitializer
public SSLContextInitializer createSSLContextInitializer() throws java.security.GeneralSecurityException
Description copied from interface:CredentialConfig
Creates an SSL context initializer using the configured trust and authentication material in this config.- Specified by:
createSSLContextInitializer
in interfaceCredentialConfig
- Returns:
- SSL context initializer
- Throws:
java.security.GeneralSecurityException
- if the ssl context initializer cannot be created
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static X509CredentialConfig.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-