java.lang.Object
org.elasticsearch.common.ssl.PemKeyConfig
- All Implemented Interfaces:
SslKeyConfig
A
SslKeyConfig that reads from PEM formatted paths.-
Constructor Summary
ConstructorsConstructorDescriptionPemKeyConfig(String certificatePath, String keyPath, char[] keyPassword, Path configBasePath) -
Method Summary
Modifier and TypeMethodDescriptionCreate aSslTrustConfigbased on the underlying file store that backs this key configbooleangetKeys()inthashCode()booleantoString()
-
Constructor Details
-
PemKeyConfig
public PemKeyConfig(String certificatePath, String keyPath, char[] keyPassword, Path configBasePath) - Parameters:
certificatePath- Path to the PEM formatted certificatekeyPath- Path to the PEM formatted private key forcertificatekeyPassword- Password for the private key (or empty is the key is not encrypted)configBasePath- The base directory from which config files should be read (used for diagnostic exceptions)
-
-
Method Details
-
hasKeyMaterial
public boolean hasKeyMaterial()- Specified by:
hasKeyMaterialin interfaceSslKeyConfig
-
getDependentFiles
- Specified by:
getDependentFilesin interfaceSslKeyConfig- Returns:
- A collection of files that are read by this config object.
The
SslKeyConfig.createKeyManager()method will read these files dynamically, so the behaviour of this key config may change whenever any of these files are modified.
-
getConfiguredCertificates
- Specified by:
getConfiguredCertificatesin interfaceSslKeyConfig- Returns:
- A collection of
certificatesused by this config.
-
createKeyManager
- Specified by:
createKeyManagerin interfaceSslKeyConfig- Returns:
- A new
X509ExtendedKeyManager.
-
getKeys
- Specified by:
getKeysin interfaceSslKeyConfig- Returns:
- A list of private keys and their associated certificates
-
asTrustConfig
Description copied from interface:SslKeyConfigCreate aSslTrustConfigbased on the underlying file store that backs this key config- Specified by:
asTrustConfigin interfaceSslKeyConfig
-
toString
-
equals
-
hashCode
public int hashCode()
-