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 classX509CredentialConfig.Builder
-
Constructor Summary
Constructors Constructor Description X509CredentialConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static X509CredentialConfig.Builderbuilder()Creates a builder for this class.SSLContextInitializercreateSSLContextInitializer()Creates an SSL context initializer using the configured trust and authentication material in this config.booleanequals(java.lang.Object o)java.lang.StringgetAuthenticationCertificate()Returns the name of the authentication certificate to use.java.lang.StringgetAuthenticationKey()Returns the name of the authentication key to use.java.lang.StringgetTrustCertificates()Returns the name of the trust certificates to use.inthashCode()voidsetAuthenticationCertificate(java.lang.String name)Sets the name of the authentication certificate to use.voidsetAuthenticationKey(java.lang.String name)Sets the name of the authentication key to use.voidsetTrustCertificates(java.lang.String name)Sets the name of the trust certificates to use.java.lang.StringtoString()
-
-
-
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:CredentialConfigCreates an SSL context initializer using the configured trust and authentication material in this config.- Specified by:
createSSLContextInitializerin 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static X509CredentialConfig.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-