Package org.minidns.dane
Class ExpectingTrustManager
- java.lang.Object
-
- org.minidns.dane.ExpectingTrustManager
-
- All Implemented Interfaces:
TrustManager
,X509TrustManager
public class ExpectingTrustManager extends Object implements X509TrustManager
-
-
Constructor Summary
Constructors Constructor Description ExpectingTrustManager(X509TrustManager trustManager)
Creates a new instance of ExpectingTrustManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkClientTrusted(X509Certificate[] chain, String authType)
void
checkServerTrusted(X509Certificate[] chain, String authType)
X509Certificate[]
getAcceptedIssuers()
CertificateException
getException()
boolean
hasException()
-
-
-
Constructor Detail
-
ExpectingTrustManager
public ExpectingTrustManager(X509TrustManager trustManager)
Creates a new instance of ExpectingTrustManager.- Parameters:
trustManager
- TheX509TrustManager
to be used for verification.null
to use the system default.
-
-
Method Detail
-
hasException
public boolean hasException()
-
getException
public CertificateException getException()
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
- Specified by:
checkClientTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
- Specified by:
checkServerTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuers
in interfaceX509TrustManager
-
-