|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.ldap.replication.ReplicationTrustManager
public class ReplicationTrustManager
A X509TrustManager implementation used by the replication subsystem. This implementation doesn't require the certificates to be stored in a file, instead it parses the given certificates of replica peers using Bouncycastle's X509CertParser and stores them in the in-memory KeyStore. The SunX509 TrustManagerFactory is then initialized using this KeyStore and the resulting X509TrustManager present in this factory's TrustManagers will be used internally to perform the certificate verification
| Method Summary | |
|---|---|
static void |
addCertificate(String certAlias,
byte[] certificate)
stores the given certificate into the keystore with the given alias name |
static void |
addCertificates(Map<String,byte[]> aliasCertMap)
loads the given map of [alias-name, certificate-data] entries into the keystore to be used by the trust manager |
void |
checkClientTrusted(X509Certificate[] chain,
String authType)
|
void |
checkServerTrusted(X509Certificate[] chain,
String authType)
|
X509Certificate[] |
getAcceptedIssuers()
|
static ReplicationTrustManager |
getInstance()
returns the singleton instance of ReplicationTrustManager, note that this return instance can only be used after calling the addCertificates(Map) method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void addCertificates(Map<String,byte[]> aliasCertMap)
throws Exception
aliasCertMap - the map of [alias-name, certificate-data] entries
Exception - in case of any issues related to certificate data parsing
public static void addCertificate(String certAlias,
byte[] certificate)
throws Exception
certAlias - the alias name to be used for this certificatecertificate - the X509 certificate data
Exception - in case of any issues related to certificate data parsingpublic static ReplicationTrustManager getInstance()
addCertificates(Map) method
public void checkClientTrusted(X509Certificate[] chain,
String authType)
throws CertificateException
checkClientTrusted in interface X509TrustManagerCertificateException
public void checkServerTrusted(X509Certificate[] chain,
String authType)
throws CertificateException
checkServerTrusted in interface X509TrustManagerCertificateExceptionpublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||