Class ThreadLocalX509TrustManager
java.lang.Object
org.opensaml.security.x509.tls.impl.ThreadLocalX509TrustManager
- All Implemented Interfaces:
TrustManager
,X509TrustManager
An implementation of
X509TrustManager
which performs its evaluation using trust engine and criteria
instances available from ThreadLocalX509TrustEngineContext
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkClientTrusted
(X509Certificate[] chain, String authType) void
checkServerTrusted
(X509Certificate[] chain, String authType) protected void
performTrustEval
(X509Certificate[] chain, String authType) Perform trust evaluation on the specified certificate chain using the trust engine and criteria available fromThreadLocalX509TrustEngineContext
.
-
Field Details
-
log
private org.slf4j.Logger logLogger.
-
-
Constructor Details
-
ThreadLocalX509TrustManager
public ThreadLocalX509TrustManager()
-
-
Method Details
-
getAcceptedIssuers
- Specified by:
getAcceptedIssuers
in interfaceX509TrustManager
-
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
-
performTrustEval
protected void performTrustEval(X509Certificate[] chain, String authType) throws CertificateException Perform trust evaluation on the specified certificate chain using the trust engine and criteria available fromThreadLocalX509TrustEngineContext
.- Parameters:
chain
- the peer certificate chainauthType
- the authentication type based on the client certificate- Throws:
CertificateException
- if the certificate chain is not trusted by this TrustManager.
-