Class SslConfiguration
- java.lang.Object
-
- org.apache.logging.log4j.core.net.ssl.SslConfiguration
-
@NullMarked @Plugin(name="Ssl", category="Core", printObject=true) public class SslConfiguration extends Object
SSL Configuration
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearSecrets()Clears the secret fields in this object but still allow it to operate normally.static SslConfigurationcreateSSLConfiguration(String protocol, KeyStoreConfiguration keyStoreConfig, TrustStoreConfiguration trustStoreConfig)Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.static SslConfigurationcreateSSLConfiguration(String protocol, KeyStoreConfiguration keyStoreConfig, TrustStoreConfiguration trustStoreConfig, boolean verifyHostName)Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.booleanequals(Object obj)@Nullable KeyStoreConfigurationgetKeyStoreConfig()StringgetProtocol()@Nullable SSLContextgetSslContext()@Nullable SSLServerSocketFactorygetSslServerSocketFactory()Deprecated.@Nullable SSLSocketFactorygetSslSocketFactory()Deprecated.@Nullable TrustStoreConfigurationgetTrustStoreConfig()inthashCode()booleanisVerifyHostName()
-
-
-
Method Detail
-
clearSecrets
public void clearSecrets()
Clears the secret fields in this object but still allow it to operate normally.
-
getSslSocketFactory
@Deprecated public @Nullable SSLSocketFactory getSslSocketFactory()
Deprecated.Gets the SSL socket factory of the configured SSL context.- Returns:
- the SSL socket factory of the configured SSL context
-
getSslServerSocketFactory
@Deprecated public @Nullable SSLServerSocketFactory getSslServerSocketFactory()
Deprecated.Gets the SSL server socket factory of the configured SSL context.- Returns:
- the SSL server socket factory of the configured SSL context
-
createSSLConfiguration
@NullUnmarked public static SslConfiguration createSSLConfiguration(String protocol, KeyStoreConfiguration keyStoreConfig, TrustStoreConfiguration trustStoreConfig)
Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.- Parameters:
protocol- The protocol, see SSLContext AlgorithmskeyStoreConfig- The KeyStoreConfiguration.trustStoreConfig- The TrustStoreConfiguration.- Returns:
- a new SslConfiguration
-
createSSLConfiguration
@NullUnmarked @PluginFactory public static SslConfiguration createSSLConfiguration(@PluginAttribute("protocol") String protocol, @PluginElement("KeyStore") KeyStoreConfiguration keyStoreConfig, @PluginElement("TrustStore") TrustStoreConfiguration trustStoreConfig, @PluginAttribute("verifyHostName") boolean verifyHostName)
Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.- Parameters:
protocol- The protocol, see SSLContext AlgorithmskeyStoreConfig- The KeyStoreConfiguration.trustStoreConfig- The TrustStoreConfiguration.verifyHostName- whether or not to perform host name verification- Returns:
- a new SslConfiguration
- Since:
- 2.12
-
getProtocol
public String getProtocol()
-
isVerifyHostName
public boolean isVerifyHostName()
-
getKeyStoreConfig
public @Nullable KeyStoreConfiguration getKeyStoreConfig()
-
getTrustStoreConfig
public @Nullable TrustStoreConfiguration getTrustStoreConfig()
-
getSslContext
public @Nullable SSLContext getSslContext()
-
-