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
-
Fields inherited from class org.apache.logging.log4j.core.net.ssl.StoreConfiguration
LOGGER
-
-
Constructor Summary
Constructors Constructor Description TrustStoreConfiguration(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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TrustStoreConfiguration
createKeyStoreConfiguration(String location, char[] password, String keyStoreType, String trustManagerFactoryAlgorithm)
static TrustStoreConfiguration
createKeyStoreConfiguration(String location, char[] password, String passwordEnvironmentVariable, String passwordFile, String keyStoreType, String trustManagerFactoryAlgorithm)
Creates a KeyStoreConfiguration.static TrustStoreConfiguration
createKeyStoreConfiguration(String location, String password, String keyStoreType, String trustManagerFactoryAlgorithm)
Deprecated.Use createKeyStoreConfiguration(String, char[], String, String)boolean
equals(Object obj)
String
getTrustManagerFactoryAlgorithm()
int
hashCode()
TrustManagerFactory
initTrustManagerFactory()
-
Methods inherited from class org.apache.logging.log4j.core.net.ssl.AbstractKeyStoreConfiguration
getKeyStore, getKeyStoreType, load
-
Methods inherited from class org.apache.logging.log4j.core.net.ssl.StoreConfiguration
clearSecrets, getLocation, getPassword, getPasswordAsCharArray, setLocation, setPassword, setPassword
-
-
-
-
Constructor Detail
-
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 Detail
-
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
Deprecated.Use createKeyStoreConfiguration(String, char[], String, String)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
public TrustManagerFactory initTrustManagerFactory() throws NoSuchAlgorithmException, KeyStoreException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractKeyStoreConfiguration
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractKeyStoreConfiguration
-
getTrustManagerFactoryAlgorithm
public String getTrustManagerFactoryAlgorithm()
-
-