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
ConstructorDescriptionKeyStoreConfiguration
(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
Modifier and TypeMethodDescriptionstatic 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) boolean
int
hashCode()
Deprecated.Planned to be removed in the next major releaseMethods 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 Details
-
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 Details
-
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 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
@Deprecated public KeyManagerFactory initKeyManagerFactory() throws NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreExceptionDeprecated.Planned to be removed in the next major release -
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractKeyStoreConfiguration
-
equals
- Overrides:
equals
in classAbstractKeyStoreConfiguration
-
getKeyManagerFactoryAlgorithm
-
KeyStoreConfiguration(String, PasswordProvider, String, String)
instead