public class AggregateTrustManager extends Object implements X509TrustManager
Modifier and Type | Class and Description |
---|---|
static class |
AggregateTrustManager.Strategy
Enum to define how trust managers should be processed.
|
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger
Logger for this class.
|
private X509TrustManager[] |
trustManagers
Trust managers to invoke.
|
private AggregateTrustManager.Strategy |
trustStrategy
Whether to require all trust managers succeed.
|
Constructor and Description |
---|
AggregateTrustManager(AggregateTrustManager.Strategy strategy,
X509TrustManager... managers)
Creates a new aggregate trust manager.
|
AggregateTrustManager(X509TrustManager... managers)
Creates a new aggregate trust manager with the ALL
AggregateTrustManager.Strategy . |
Modifier and Type | Method and Description |
---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType) |
X509Certificate[] |
getAcceptedIssuers() |
X509TrustManager[] |
getTrustManagers()
Returns the trust managers that are aggregated.
|
AggregateTrustManager.Strategy |
getTrustStrategy()
Returns the trust strategy.
|
String |
toString() |
protected final Logger logger
private final X509TrustManager[] trustManagers
private final AggregateTrustManager.Strategy trustStrategy
public AggregateTrustManager(X509TrustManager... managers)
AggregateTrustManager.Strategy
.managers
- to aggregatepublic AggregateTrustManager(AggregateTrustManager.Strategy strategy, X509TrustManager... managers)
strategy
- for processing trust managersmanagers
- to aggregatepublic X509TrustManager[] getTrustManagers()
public AggregateTrustManager.Strategy getTrustStrategy()
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted
in interface X509TrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted
in interface X509TrustManager
CertificateException
public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface X509TrustManager
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.