Module org.elasticsearch.sslconfig
Package org.elasticsearch.common.ssl
Class DiagnosticTrustManager
java.lang.Object
javax.net.ssl.X509ExtendedTrustManager
org.elasticsearch.common.ssl.DiagnosticTrustManager
- All Implemented Interfaces:
TrustManager,X509TrustManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThis interface exists because the ssl-config library does not depend on log4j, however the whole purpose of this class is to log diagnostic messages, so it must be provided with a function by which it can do that. -
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticTrustManager(X509ExtendedTrustManager delegate, Supplier<String> contextName, DiagnosticTrustManager.DiagnosticLogger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] chain, String authType) voidcheckClientTrusted(X509Certificate[] chain, String authType, Socket socket) voidcheckClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) voidcheckServerTrusted(X509Certificate[] chain, String authType) voidcheckServerTrusted(X509Certificate[] chain, String authType, Socket socket) voidcheckServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
-
Constructor Details
-
DiagnosticTrustManager
public DiagnosticTrustManager(X509ExtendedTrustManager delegate, Supplier<String> contextName, DiagnosticTrustManager.DiagnosticLogger logger) - Parameters:
contextName- The descriptive name of the context that this trust manager is operating in (e.g "xpack.security.http.ssl")logger- For uses that depend on log4j, it is recommended that this parameter be equivalent toLogManager.getLogger(DiagnosticTrustManager.class)::warn
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException - Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException - Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException - Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException - Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException - Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException - Throws:
CertificateException
-
getAcceptedIssuers
-