Class TrustStoreConfiguration
java.lang.Object
org.apache.logging.log4j.core.net.ssl.StoreConfiguration<KeyStore>
org.apache.logging.log4j.core.net.ssl.AbstractKeyStoreConfiguration
org.apache.logging.log4j.core.net.ssl.TrustStoreConfiguration
@Plugin(name="TrustStore",
category="Core",
printObject=true)
public class TrustStoreConfiguration
extends AbstractKeyStoreConfiguration
Configuration of the TrustStore
-
Field Summary
FieldsFields inherited from class StoreConfiguration
JKS, LOGGER, PKCS12 -
Constructor Summary
ConstructorsConstructorDescriptionTrustStoreConfiguration(String location, char[] password, String keyStoreType, String trustManagerFactoryAlgorithm) Deprecated.TrustStoreConfiguration(String location, String password, String keyStoreType, String trustManagerFactoryAlgorithm) Deprecated.TrustStoreConfiguration(String location, PasswordProvider passwordProvider, String keyStoreType, String trustManagerFactoryAlgorithm) -
Method Summary
Modifier and TypeMethodDescriptionstatic TrustStoreConfigurationcreateKeyStoreConfiguration(String location, char[] password, String keyStoreType, String trustManagerFactoryAlgorithm) static TrustStoreConfigurationcreateKeyStoreConfiguration(String location, char[] password, String passwordEnvironmentVariable, String passwordFile, String keyStoreType, String trustManagerFactoryAlgorithm) Creates a KeyStoreConfiguration.static TrustStoreConfigurationcreateKeyStoreConfiguration(String location, String password, String keyStoreType, String trustManagerFactoryAlgorithm) booleaninthashCode()Deprecated.Planned to be removed in the next major releaseMethods inherited from class AbstractKeyStoreConfiguration
getKeyStore, getKeyStoreType, loadMethods inherited from class StoreConfiguration
clearSecrets, getLocation, getPassword, getPasswordAsCharArray, setLocation, setPassword, setPassword
-
Field Details
-
trustManagerFactoryAlgorithm
-
-
Constructor Details
-
TrustStoreConfiguration
public TrustStoreConfiguration(String location, PasswordProvider passwordProvider, String keyStoreType, String trustManagerFactoryAlgorithm) throws StoreConfigurationException - Throws:
StoreConfigurationException
-
TrustStoreConfiguration
@Deprecated public TrustStoreConfiguration(String location, char[] password, String keyStoreType, String trustManagerFactoryAlgorithm) throws StoreConfigurationException Deprecated.- Throws:
StoreConfigurationException
-
TrustStoreConfiguration
@Deprecated public TrustStoreConfiguration(String location, String password, String keyStoreType, String trustManagerFactoryAlgorithm) throws StoreConfigurationException Deprecated.- Throws:
StoreConfigurationException
-
-
Method Details
-
createKeyStoreConfiguration
@PluginFactory public static TrustStoreConfiguration createKeyStoreConfiguration(@PluginAttribute("location") String location, @PluginAttribute(value="password",sensitive=true) char[] password, @PluginAttribute("passwordEnvironmentVariable") String passwordEnvironmentVariable, @PluginAttribute("passwordFile") String passwordFile, @PluginAttribute("type") String keyStoreType, @PluginAttribute("trustManagerFactoryAlgorithm") String trustManagerFactoryAlgorithm) throws StoreConfigurationException Creates a KeyStoreConfiguration.- Parameters:
location- The location of the KeyStore, a file path, URL or resource.password- The password to access the KeyStore.keyStoreType- The KeyStore type, null defaults to"JKS".trustManagerFactoryAlgorithm- The standard name of the requested trust management algorithm. See the Java Secure Socket Extension Reference Guide for information these names.- Returns:
- a new TrustStoreConfiguration
- Throws:
StoreConfigurationException- Thrown if this instance cannot load the KeyStore.
-
createKeyStoreConfiguration
@Deprecated public static TrustStoreConfiguration createKeyStoreConfiguration(String location, char[] password, String keyStoreType, String trustManagerFactoryAlgorithm) throws StoreConfigurationException - Throws:
StoreConfigurationException
-
createKeyStoreConfiguration
@Deprecated public static TrustStoreConfiguration createKeyStoreConfiguration(String location, String password, String keyStoreType, String trustManagerFactoryAlgorithm) throws StoreConfigurationException Creates a KeyStoreConfiguration.- Parameters:
location- The location of the KeyStore, a file path, URL or resource.password- The password to access the KeyStore.keyStoreType- The KeyStore type, null defaults to"JKS".trustManagerFactoryAlgorithm- The standard name of the requested trust management algorithm. See the Java Secure Socket Extension Reference Guide for information these names.- Returns:
- a new TrustStoreConfiguration
- Throws:
StoreConfigurationException- Thrown if this instance cannot load the KeyStore.
-
initTrustManagerFactory
@Deprecated public TrustManagerFactory initTrustManagerFactory() throws NoSuchAlgorithmException, KeyStoreExceptionDeprecated.Planned to be removed in the next major release -
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractKeyStoreConfiguration
-
equals
- Overrides:
equalsin classAbstractKeyStoreConfiguration
-
getTrustManagerFactoryAlgorithm
-
TrustStoreConfiguration(String, PasswordProvider, String, String)instead