public class LDAPSTrustStoreSingleton
extends java.lang.Object
To overcome this limitation, this object is created as a Singleton, a single instance of a static object so that the required LDAP SSL configuration parameters can be created from the static context of the SSLSocketFactory.getDefault() method.
Note: The LDAPSTrustStoreSingleton can be returned from any context by calling:
LDAPSTrustStoreSingleton.getLDAPSTrustStoreSingleton();
| Constructor and Description |
|---|
LDAPSTrustStoreSingleton() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCertificate(java.security.cert.X509Certificate cert)
Adds a certificate to this object.
|
void |
addCertificates(java.security.cert.X509Certificate[] certs)
Adds a certificate to the LDAPS trustStore.
|
void |
clearTrustStore()
Clear the list of certificates trusted by LDAPS
|
java.security.cert.X509Certificate[] |
getLDAPSTrustStoreCerts()
Returns the list of trusted certificates that are stored by the
Singleton object.
|
static LDAPSTrustStoreSingleton |
getLDAPSTrustStoreSingleton()
Returns the LDAPSTrustStoreSingleton.
|
boolean |
removeCertificate(java.security.cert.X509Certificate cert)
Removes a certificate from the LDAPS trustStore if it is contained in the
trustStore
|
public boolean addCertificate(java.security.cert.X509Certificate cert)
cert - the certificate to addtrue if the certificate was added, false
if it was not addedpublic boolean removeCertificate(java.security.cert.X509Certificate cert)
cert - the certificate to addtrue if the certificate was removed, false
if it was not removed.public void addCertificates(java.security.cert.X509Certificate[] certs)
certs - the certificates to addpublic static LDAPSTrustStoreSingleton getLDAPSTrustStoreSingleton()
public java.security.cert.X509Certificate[] getLDAPSTrustStoreCerts()
public void clearTrustStore()