public class MyTrustManager extends Object implements X509TrustManager
Modifier and Type | Field and Description |
---|---|
String |
DEFAULT_TRUST_ROOT_PATH |
Constructor and Description |
---|
MyTrustManager(MyLoggingFacade logger,
SSLConfiguration sslConfiguration) |
MyTrustManager(MyLoggingFacade logger,
String trustRootPath,
String serverDN) |
Modifier and Type | Method and Description |
---|---|
void |
checkClientTrusted(X509Certificate[] certs,
String authType) |
protected void |
checkServerCertPath(X509Certificate[] certs) |
void |
checkServerTrusted(X509Certificate[] certs,
String authType) |
X509Certificate[] |
getAcceptedIssuers() |
String |
getHost() |
protected X509Certificate[] |
getIssuersFromDirectory(File dir)
Try to read the key store certs from a directory of certificates.
|
protected X509Certificate[] |
getIssuersFromFile(File certFile)
Read the certs for the key store from a JKS file
|
MyLoggingFacade |
getLogger() |
String |
getServerDN() |
SSLConfiguration |
getSslConfiguration() |
String |
getTrustRootPath() |
boolean |
hasServerDN() |
protected boolean |
hasSSLConfiguration() |
boolean |
isRequestTrustRoots() |
void |
setHost(String host) |
void |
setRequestTrustRoots(boolean requestTrustRoots) |
void |
setServerDN(String serverDN) |
void |
setTrustRootPath(String trustRootPath) |
public final String DEFAULT_TRUST_ROOT_PATH
public MyTrustManager(MyLoggingFacade logger, SSLConfiguration sslConfiguration)
public MyTrustManager(MyLoggingFacade logger, String trustRootPath, String serverDN)
public SSLConfiguration getSslConfiguration()
public boolean hasServerDN()
public String getServerDN()
public void setServerDN(String serverDN)
public MyLoggingFacade getLogger()
protected boolean hasSSLConfiguration()
public String getTrustRootPath()
public void setTrustRootPath(String trustRootPath)
public boolean isRequestTrustRoots()
public void setRequestTrustRoots(boolean requestTrustRoots)
public String getHost()
public void setHost(String host)
protected X509Certificate[] getIssuersFromDirectory(File dir)
protected X509Certificate[] getIssuersFromFile(File certFile)
public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface X509TrustManager
public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException
checkClientTrusted
in interface X509TrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException
checkServerTrusted
in interface X509TrustManager
CertificateException
protected void checkServerCertPath(X509Certificate[] certs) throws CertificateException
CertificateException
Copyright © 2019. All Rights Reserved.