java.lang.Object
org.elasticsearch.common.ssl.StoreTrustConfig
- All Implemented Interfaces:
SslTrustConfig
A
SslTrustConfig that builds a Trust Manager from a keystore file.-
Constructor Summary
ConstructorsConstructorDescriptionStoreTrustConfig(String path, char[] password, String type, String algorithm, boolean requireTrustAnchors, Path configBasePath) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCollection<? extends StoredCertificate> inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.ssl.SslTrustConfig
isSystemDefault
-
Constructor Details
-
StoreTrustConfig
public StoreTrustConfig(String path, char[] password, String type, String algorithm, boolean requireTrustAnchors, Path configBasePath) - Parameters:
path- The path to the keystore filepassword- The password for the keystoretype- Thetypeof the keystore (typically "PKCS12" or "jks"). SeeKeyStoreUtil.inferKeyStoreType(java.lang.String).algorithm- The algorithm to use for the Trust Manager (seeTrustManagerFactory.getAlgorithm()).requireTrustAnchors- If true, the truststore will be checked to ensure that it contains at least one valid trust anchor.configBasePath- The base path for the configuration directory
-
-
Method Details
-
getDependentFiles
- Specified by:
getDependentFilesin interfaceSslTrustConfig- Returns:
- A collection of files that are read by this config object.
The
SslTrustConfig.createTrustManager()method will read these files dynamically, so the behaviour of this trust config may change if any of these files are modified.
-
getConfiguredCertificates
- Specified by:
getConfiguredCertificatesin interfaceSslTrustConfig- Returns:
- A collection of
certificatesused by this config, excluding those shipped with the JDK
-
createTrustManager
- Specified by:
createTrustManagerin interfaceSslTrustConfig- Returns:
- A new
X509ExtendedTrustManager.
-
equals
-
hashCode
public int hashCode() -
toString
-