Package org.ldaptive.ssl
Class X509CredentialConfig
java.lang.Object
org.ldaptive.ssl.X509CredentialConfig
- All Implemented Interfaces:
CredentialConfig
Provides the properties necessary for creating an SSL context initializer with an X.509 credential reader.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Name of the authentication certificate to use for the SSL connection.private String
Name of the key to use for the SSL connection.private final X509CertificateCredentialReader
Reads X.509 certificate credential.private final X509CertificatesCredentialReader
Reads X.509 certificates credential.private static final int
hash code seed.private final PrivateKeyCredentialReader
Reads private key credential.private String
Name of the trust certificates to use for the SSL connection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic X509CredentialConfig.Builder
builder()
Creates a builder for this class.Creates an SSL context initializer using the configured trust and authentication material in this config.boolean
Returns the name of the authentication certificate to use.Returns the name of the authentication key to use.Returns the name of the trust certificates to use.int
hashCode()
void
Sets the name of the authentication certificate to use.void
setAuthenticationKey
(String name) Sets the name of the authentication key to use.void
setTrustCertificates
(String name) Sets the name of the trust certificates to use.toString()
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
certsReader
Reads X.509 certificates credential. -
certReader
Reads X.509 certificate credential. -
keyReader
Reads private key credential. -
trustCertificates
Name of the trust certificates to use for the SSL connection. -
authenticationCertificate
Name of the authentication certificate to use for the SSL connection. -
authenticationKey
Name of the key to use for the SSL connection.
-
-
Constructor Details
-
X509CredentialConfig
public X509CredentialConfig()
-
-
Method Details
-
getTrustCertificates
Returns the name of the trust certificates to use.- Returns:
- trust certificates name
-
setTrustCertificates
Sets the name of the trust certificates to use.- Parameters:
name
- trust certificates name
-
getAuthenticationCertificate
Returns the name of the authentication certificate to use.- Returns:
- authentication certificate name
-
setAuthenticationCertificate
Sets the name of the authentication certificate to use.- Parameters:
name
- authentication certificate name
-
getAuthenticationKey
Returns the name of the authentication key to use.- Returns:
- authentication key name
-
setAuthenticationKey
Sets the name of the authentication key to use.- Parameters:
name
- authentication key name
-
createSSLContextInitializer
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:
GeneralSecurityException
- if the ssl context initializer cannot be created
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
Creates a builder for this class.- Returns:
- new builder
-