Package org.apache.hadoop.security.ssl
Class ReloadingX509TrustManager
java.lang.Object
org.apache.hadoop.security.ssl.ReloadingX509TrustManager
- All Implemented Interfaces:
TrustManager,X509TrustManager
@Private
@Evolving
public final class ReloadingX509TrustManager
extends Object
implements X509TrustManager
A
TrustManager implementation that exposes a method, loadFrom(Path)
to reload its configuration for example when the truststore file on disk changes.-
Constructor Summary
ConstructorsConstructorDescriptionReloadingX509TrustManager(String type, String location, String password) Creates a reloadable trustmanager. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] chain, String authType) voidcheckServerTrusted(X509Certificate[] chain, String authType)
-
Constructor Details
-
ReloadingX509TrustManager
public ReloadingX509TrustManager(String type, String location, String password) throws IOException, GeneralSecurityException Creates a reloadable trustmanager. The trustmanager reloads itself if the underlying trustore file has changed.- Parameters:
type- type of truststore file, typically 'jks'.location- local path to the truststore file.password- password of the truststore file. changed, in milliseconds.- Throws:
IOException- thrown if the truststore could not be initialized due to an IO error.GeneralSecurityException- thrown if the truststore could not be initialized due to a security error.
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException - Specified by:
checkClientTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException - Specified by:
checkServerTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
getAcceptedIssuers
- Specified by:
getAcceptedIssuersin interfaceX509TrustManager
-
loadFrom
-