Package com.linecorp.armeria.spring
Class Ssl
java.lang.Object
com.linecorp.armeria.spring.Ssl
public class Ssl extends Object
Simple server-independent abstraction for SSL configuration.
-
Constructor Summary
Constructors Constructor Description Ssl()
-
Method Summary
Modifier and Type Method Description List<String>
getCiphers()
Returns the supported SSL ciphers.ClientAuth
getClientAuth()
Returns whether client authentication is not wanted ("none"), wanted ("want") or needed ("need").List<String>
getEnabledProtocols()
Returns the enabled SSL protocols.String
getKeyAlias()
Returns the alias that identifies the key in the key store.String
getKeyPassword()
Returns the password used to access the key in the key store.String
getKeyStore()
Returns the path to the key store that holds the SSL certificate (typically a jks file).String
getKeyStorePassword()
Returns the password used to access the key store.String
getKeyStoreProvider()
Returns the provider for the key store.String
getKeyStoreType()
Returns the type of the key store.SslProvider
getProvider()
Returns Netty SSL Provider.String
getTrustStore()
Returns the trust store that holds SSL certificates.String
getTrustStorePassword()
Returns the password used to access the trust store.String
getTrustStoreProvider()
Returns the provider for the trust store.String
getTrustStoreType()
Returns the type of the trust store.boolean
isEnabled()
Returns whether to enable SSL support.Ssl
setCiphers(List<String> ciphers)
Sets the supported SSL ciphers.Ssl
setClientAuth(ClientAuth clientAuth)
Sets whether the client authentication is not none (ClientAuth.NONE
), optional (ClientAuth.OPTIONAL
) or required (ClientAuth.REQUIRE
).Ssl
setEnabled(boolean enabled)
Enables (or disables) SSL support.Ssl
setEnabledProtocols(List<String> enabledProtocols)
Sets the enabled SSL protocols.Ssl
setKeyAlias(String keyAlias)
Sets the alias that identifies the key in the key store.Ssl
setKeyPassword(String keyPassword)
Sets the password used to access the key in the key store.Ssl
setKeyStore(String keyStore)
Sets the path to the key store that holds the SSL certificate (typically a jks file).Ssl
setKeyStorePassword(String keyStorePassword)
Sets the password used to access the key store.Ssl
setKeyStoreProvider(String keyStoreProvider)
Sets the provider for the key store.Ssl
setKeyStoreType(String keyStoreType)
Sets the type of the key store.void
setProvider(SslProvider provider)
Sets Netty SSL Provider namely JDK or OPENSSLSslProvider
.Ssl
setTrustStore(String trustStore)
Sets the trust store that holds SSL certificates.Ssl
setTrustStorePassword(String trustStorePassword)
Sets the password used to access the trust store.Ssl
setTrustStoreProvider(String trustStoreProvider)
Sets the provider for the trust store.Ssl
setTrustStoreType(String trustStoreType)
Sets the type of the trust store.
-
Constructor Details
-
Ssl
public Ssl()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether to enable SSL support.- Returns:
- whether to enable SSL support
-
setEnabled
Enables (or disables) SSL support. -
getProvider
Returns Netty SSL Provider.- Returns:
- Netty SSL Provider
-
setProvider
Sets Netty SSL Provider namely JDK or OPENSSLSslProvider
.- Parameters:
provider
- Netty SSL Provider
-
getClientAuth
Returns whether client authentication is not wanted ("none"), wanted ("want") or needed ("need"). Requires a trust store.- Returns:
- the
ClientAuth
to use
-
setClientAuth
Sets whether the client authentication is not none (ClientAuth.NONE
), optional (ClientAuth.OPTIONAL
) or required (ClientAuth.REQUIRE
). -
getCiphers
Returns the supported SSL ciphers.- Returns:
- the supported SSL ciphers
-
setCiphers
Sets the supported SSL ciphers. -
getEnabledProtocols
Returns the enabled SSL protocols.- Returns:
- the enabled SSL protocols.
-
setEnabledProtocols
Sets the enabled SSL protocols. -
getKeyAlias
Returns the alias that identifies the key in the key store.- Returns:
- the key alias
-
setKeyAlias
Sets the alias that identifies the key in the key store. -
getKeyPassword
Returns the password used to access the key in the key store.- Returns:
- the key password
-
setKeyPassword
Sets the password used to access the key in the key store. -
getKeyStore
Returns the path to the key store that holds the SSL certificate (typically a jks file).- Returns:
- the path to the key store
-
setKeyStore
Sets the path to the key store that holds the SSL certificate (typically a jks file). -
getKeyStorePassword
Returns the password used to access the key store.- Returns:
- the key store password
-
setKeyStorePassword
Sets the password used to access the key store. -
getKeyStoreType
Returns the type of the key store.- Returns:
- the key store type
-
setKeyStoreType
Sets the type of the key store. -
getKeyStoreProvider
Returns the provider for the key store.- Returns:
- the key store provider
-
setKeyStoreProvider
Sets the provider for the key store. -
getTrustStore
Returns the trust store that holds SSL certificates.- Returns:
- the trust store
-
setTrustStore
Sets the trust store that holds SSL certificates. -
getTrustStorePassword
Returns the password used to access the trust store.- Returns:
- the trust store password
-
setTrustStorePassword
Sets the password used to access the trust store. -
getTrustStoreType
Returns the type of the trust store.- Returns:
- the trust store type
-
setTrustStoreType
Sets the type of the trust store. -
getTrustStoreProvider
Returns the provider for the trust store.- Returns:
- the trust store provider
-
setTrustStoreProvider
Sets the provider for the trust store.
-