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
Modifier and TypeMethodDescriptionvoidClears 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.booleanDeprecated.Deprecated.inthashCode()boolean
-
Method Details
-
clearSecrets
public void clearSecrets()Clears the secret fields in this object but still allow it to operate normally. -
getSslSocketFactory
Deprecated.Gets the SSL socket factory of the configured SSL context.- Returns:
- the SSL socket factory of the configured SSL context
-
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 @PluginFactory public static SslConfiguration createSSLConfiguration(@PluginAttribute("protocol") String protocol, @PluginElement("KeyStore") KeyStoreConfiguration keyStoreConfig, @PluginElement("TrustStore") 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 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
-
hashCode
public int hashCode() -
equals
-
getProtocol
-
isVerifyHostName
public boolean isVerifyHostName() -
getKeyStoreConfig
-
getTrustStoreConfig
-
getSslContext
-
SSLContext.getServerSocketFactory()ongetSslContext()