Package edu.uiuc.ncsa.security.util.ssl
Class MyTrustManager
- java.lang.Object
- 
- edu.uiuc.ncsa.security.util.ssl.MyTrustManager
 
- 
- All Implemented Interfaces:
- TrustManager,- X509TrustManager
 
 public class MyTrustManager extends Object implements X509TrustManager 
- 
- 
Field SummaryFields Modifier and Type Field Description StringDEFAULT_TRUST_ROOT_PATH
 - 
Constructor SummaryConstructors Constructor Description MyTrustManager(MyLoggingFacade logger, SSLConfiguration sslConfiguration)MyTrustManager(MyLoggingFacade logger, String trustRootPath, String serverDN)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckClientTrusted(X509Certificate[] certs, String authType)protected voidcheckServerCertPath(X509Certificate[] certs)voidcheckServerTrusted(X509Certificate[] certs, String authType)X509Certificate[]getAcceptedIssuers()StringgetHost()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 fileMyLoggingFacadegetLogger()StringgetServerDN()SSLConfigurationgetSslConfiguration()StringgetTrustRootPath()booleanhasServerDN()protected booleanhasSSLConfiguration()booleanisRequestTrustRoots()voidsetHost(String host)voidsetRequestTrustRoots(boolean requestTrustRoots)voidsetServerDN(String serverDN)voidsetTrustRootPath(String trustRootPath)
 
- 
- 
- 
Field Detail- 
DEFAULT_TRUST_ROOT_PATHpublic final String DEFAULT_TRUST_ROOT_PATH - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
MyTrustManagerpublic MyTrustManager(MyLoggingFacade logger, SSLConfiguration sslConfiguration) 
 - 
MyTrustManagerpublic MyTrustManager(MyLoggingFacade logger, String trustRootPath, String serverDN) 
 
- 
 - 
Method Detail- 
getSslConfigurationpublic SSLConfiguration getSslConfiguration() 
 - 
hasServerDNpublic boolean hasServerDN() 
 - 
getServerDNpublic String getServerDN() 
 - 
setServerDNpublic void setServerDN(String serverDN) 
 - 
getLoggerpublic MyLoggingFacade getLogger() 
 - 
hasSSLConfigurationprotected boolean hasSSLConfiguration() 
 - 
getTrustRootPathpublic String getTrustRootPath() 
 - 
setTrustRootPathpublic void setTrustRootPath(String trustRootPath) 
 - 
isRequestTrustRootspublic boolean isRequestTrustRoots() 
 - 
setRequestTrustRootspublic void setRequestTrustRoots(boolean requestTrustRoots) 
 - 
getHostpublic String getHost() 
 - 
setHostpublic void setHost(String host) 
 - 
getIssuersFromDirectoryprotected X509Certificate[] getIssuersFromDirectory(File dir) Try to read the key store certs from a directory of certificates.- Returns:
 
 - 
getIssuersFromFileprotected X509Certificate[] getIssuersFromFile(File certFile) Read the certs for the key store from a JKS file- Returns:
 
 - 
getAcceptedIssuerspublic X509Certificate[] getAcceptedIssuers() - Specified by:
- getAcceptedIssuersin interface- X509TrustManager
 
 - 
checkClientTrustedpublic void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException - Specified by:
- checkClientTrustedin interface- X509TrustManager
- Throws:
- CertificateException
 
 - 
checkServerTrustedpublic void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException - Specified by:
- checkServerTrustedin interface- X509TrustManager
- Throws:
- CertificateException
 
 - 
checkServerCertPathprotected void checkServerCertPath(X509Certificate[] certs) throws CertificateException - Throws:
- CertificateException
 
 
- 
 
-