public final class LdapClientTrustStoreManager extends Object implements X509TrustManager, Serializable
| Modifier and Type | Field and Description |
|---|---|
private static String |
CLS_NM |
private boolean |
isExamineValidityDates |
private static org.slf4j.Logger |
LOG |
private static long |
serialVersionUID
Default serialVersionUID
|
private String |
trustStoreFile |
private String |
trustStoreFormat |
private char[] |
trustStorePw |
private X509TrustManager[] |
x509TrustManagers |
| Constructor and Description |
|---|
LdapClientTrustStoreManager(String trustStoreFile,
char[] trustStorePw,
String trustStoreFormat,
boolean isExamineValidity)
Constructor used by connection configuration utility to load trust store manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] x509Chain,
String authNType)
Determine if client certificate is to be trusted.
|
void |
checkServerTrusted(X509Certificate[] x509Chain,
String authNType)
Determine if server certificate is to be trusted.
|
X509Certificate[] |
getAcceptedIssuers()
Return the list of accepted issuers for this trust manager.
|
private X509TrustManager[] |
getTrustManagers(X509Certificate[] x509Chain)
Return array of trust managers to caller.
|
private X509TrustManager[] |
getTrustManagersOnClasspath(X509Certificate[] x509Chain)
Return array of trust managers to caller.
|
private KeyStore |
getTrustStore()
Load the TrustStore file into JSSE KeyStore instance.
|
private InputStream |
getTrustStoreInputStream()
Read the trust store off the classpath.
|
private X509TrustManager[] |
loadTrustManagers(KeyStore trustStore)
Return an array of X.509 TrustManagers.
|
private static final long serialVersionUID
private static final String CLS_NM
private static final org.slf4j.Logger LOG
private boolean isExamineValidityDates
private char[] trustStorePw
private String trustStoreFile
private String trustStoreFormat
private X509TrustManager[] x509TrustManagers
public LdapClientTrustStoreManager(String trustStoreFile, char[] trustStorePw, String trustStoreFormat, boolean isExamineValidity)
trustStoreFile - contains name of trust store file.trustStorePw - contains the password for trust storetrustStoreFormat - contains the format for trust storeisExamineValidity - boolean var determines if certificate will be examined for valid dates on load.public void checkClientTrusted(X509Certificate[] x509Chain, String authNType) throws CertificateException
checkClientTrusted in interface X509TrustManagerx509Chain - The certificate chainauthNType - The key exchange algorithm being usedCertificateException - If the trustManager cannot be foundpublic void checkServerTrusted(X509Certificate[] x509Chain, String authNType) throws CertificateException
checkServerTrusted in interface X509TrustManagerx509Chain - The certificate chainauthNType - The key exchange algorithm being usedCertificateException - If the trustManager cannot be foundpublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerprivate X509TrustManager[] getTrustManagers(X509Certificate[] x509Chain) throws CertificateException
x509Chain - contains input X.509 certificate chain.CertificateException - if trustStoreFile instance variable is null.private X509TrustManager[] getTrustManagersOnClasspath(X509Certificate[] x509Chain) throws CertificateException
x509Chain - contains input X.509 certificate chain.CertificateException - if trustStoreFile instance variable is null.private X509TrustManager[] loadTrustManagers(KeyStore trustStore) throws CertificateException
trustStore - handle to input trustStoreCertificateException - if problem occurs during TrustManager initialization.private KeyStore getTrustStore() throws CertificateException
CertificateException - if cannot process file load.private InputStream getTrustStoreInputStream() throws CertificateException
CertificateException - If the file cannot be foundCopyright © 2009–2019 The Apache Software Foundation. All rights reserved.