Class KeyStoreConfiguration
- 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.KeyStoreConfiguration
-
@Plugin(name="KeyStore", category="Core", printObject=true) public class KeyStoreConfiguration extends AbstractKeyStoreConfiguration
Configuration of the KeyStore
-
-
Field Summary
-
Fields inherited from class org.apache.logging.log4j.core.net.ssl.StoreConfiguration
LOGGER
-
-
Constructor Summary
Constructors Constructor Description KeyStoreConfiguration(String location, char[] password, String keyStoreType, String keyManagerFactoryAlgorithm)
Deprecated.KeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm)
Deprecated.KeyStoreConfiguration(String location, PasswordProvider passwordProvider, String keyStoreType, String keyManagerFactoryAlgorithm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static KeyStoreConfiguration
createKeyStoreConfiguration(String location, char[] password, String keyStoreType, String keyManagerFactoryAlgorithm)
static KeyStoreConfiguration
createKeyStoreConfiguration(String location, char[] password, String passwordEnvironmentVariable, String passwordFile, String keyStoreType, String keyManagerFactoryAlgorithm)
Creates a KeyStoreConfiguration.static KeyStoreConfiguration
createKeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm)
Deprecated.Use createKeyStoreConfiguration(String, char[], String, String)boolean
equals(Object obj)
String
getKeyManagerFactoryAlgorithm()
int
hashCode()
KeyManagerFactory
initKeyManagerFactory()
-
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
-
KeyStoreConfiguration
public KeyStoreConfiguration(String location, PasswordProvider passwordProvider, String keyStoreType, String keyManagerFactoryAlgorithm) throws StoreConfigurationException
- Throws:
StoreConfigurationException
- Thrown if this instance cannot load the KeyStore.
-
KeyStoreConfiguration
@Deprecated public KeyStoreConfiguration(String location, char[] password, String keyStoreType, String keyManagerFactoryAlgorithm) throws StoreConfigurationException
Deprecated.- Throws:
StoreConfigurationException
- Thrown if this instance cannot load the KeyStore.
-
KeyStoreConfiguration
@Deprecated public KeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm) throws StoreConfigurationException
Deprecated.- Throws:
StoreConfigurationException
- Thrown if this instance cannot load the KeyStore.
-
-
Method Detail
-
createKeyStoreConfiguration
@PluginFactory public static KeyStoreConfiguration 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("keyManagerFactoryAlgorithm") String keyManagerFactoryAlgorithm) 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"
.keyManagerFactoryAlgorithm
- The standard name of the requested algorithm. See the Java Secure Socket Extension Reference Guide for information about these names.- Returns:
- a new KeyStoreConfiguration
- Throws:
StoreConfigurationException
- Thrown if this call cannot load the KeyStore.
-
createKeyStoreConfiguration
@Deprecated public static KeyStoreConfiguration createKeyStoreConfiguration(String location, char[] password, String keyStoreType, String keyManagerFactoryAlgorithm) throws StoreConfigurationException
- Throws:
StoreConfigurationException
-
createKeyStoreConfiguration
@Deprecated public static KeyStoreConfiguration createKeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm) 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"
.keyManagerFactoryAlgorithm
- The standard name of the requested algorithm. See the Java Secure Socket Extension Reference Guide for information about these names.- Returns:
- a new KeyStoreConfiguration
- Throws:
StoreConfigurationException
- Thrown if this call cannot load the KeyStore.
-
initKeyManagerFactory
public KeyManagerFactory initKeyManagerFactory() throws NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractKeyStoreConfiguration
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractKeyStoreConfiguration
-
getKeyManagerFactoryAlgorithm
public String getKeyManagerFactoryAlgorithm()
-
-