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
FieldsFields inherited from class StoreConfiguration
JKS, LOGGER, PKCS12 -
Constructor Summary
ConstructorsConstructorDescriptionKeyStoreConfiguration(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 KeyStoreConfigurationcreateKeyStoreConfiguration(String location, char[] password, String keyStoreType, String keyManagerFactoryAlgorithm) static KeyStoreConfigurationcreateKeyStoreConfiguration(String location, char[] password, String passwordEnvironmentVariable, String passwordFile, String keyStoreType, String keyManagerFactoryAlgorithm) Creates a KeyStoreConfiguration.static KeyStoreConfigurationcreateKeyStoreConfiguration(String location, String password, String keyStoreType, String keyManagerFactoryAlgorithm) 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
-
keyManagerFactoryAlgorithm
-
-
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:
hashCodein classAbstractKeyStoreConfiguration
-
equals
- Overrides:
equalsin classAbstractKeyStoreConfiguration
-
getKeyManagerFactoryAlgorithm
-
KeyStoreConfiguration(String, PasswordProvider, String, String)instead