public interface ServerSecurityConfigurator extends SecurityConfigurator
SecurityConfigurator
contract for servers.Modifier and Type | Interface and Description |
---|---|
static class |
ServerSecurityConfigurator.ClientAuth
Indicates the state of the
SSLEngine with respect to client authentication. |
SecurityConfigurator.SslProvider
Modifier and Type | Method and Description |
---|---|
ServerSecurityConfigurator |
ciphers(java.lang.Iterable<java.lang.String> ciphers)
The cipher suites to enable, in the order of preference.
|
ServerSecurityConfigurator |
clientAuth(ServerSecurityConfigurator.ClientAuth clientAuth)
Sets the client authentication mode.
|
ServerSecurityConfigurator |
protocols(java.lang.String... protocols)
The SSL protocols to enable, in the order of preference.
|
ServerSecurityConfigurator |
provider(SecurityConfigurator.SslProvider provider)
Sets the
SecurityConfigurator.SslProvider to use. |
ServerSecurityConfigurator |
sessionCacheSize(long sessionCacheSize)
Set the size of the cache used for storing SSL session objects.
|
ServerSecurityConfigurator |
sessionTimeout(long sessionTimeout)
Set the timeout for the cached SSL session objects, in seconds.
|
ServerSecurityConfigurator |
trustManager(java.util.function.Supplier<java.io.InputStream> trustCertChainSupplier)
Trusted certificates for verifying the remote endpoint's certificate.
|
ServerSecurityConfigurator |
trustManager(javax.net.ssl.TrustManagerFactory trustManagerFactory)
Trust manager for verifying the remote endpoint's certificate.
|
ServerSecurityConfigurator trustManager(java.util.function.Supplier<java.io.InputStream> trustCertChainSupplier)
SecurityConfigurator
X.509
certificate chain in PEM
format.trustManager
in interface SecurityConfigurator
trustCertChainSupplier
- a supplier for the certificate chain input stream.
The responsibility to call InputStream.close()
is transferred to callers of the returned
Supplier
. If this is not the desired behavior then wrap the InputStream
and override
InputStream.close()
.
this
.ServerSecurityConfigurator trustManager(javax.net.ssl.TrustManagerFactory trustManagerFactory)
SecurityConfigurator
TrustManagerFactory
which take preference over any configured Supplier
.trustManager
in interface SecurityConfigurator
trustManagerFactory
- the TrustManagerFactory
to use.this
.ServerSecurityConfigurator protocols(java.lang.String... protocols)
SecurityConfigurator
protocols
in interface SecurityConfigurator
protocols
- the protocols to use.this
.SSLEngine.setEnabledProtocols(String[])
ServerSecurityConfigurator ciphers(java.lang.Iterable<java.lang.String> ciphers)
SecurityConfigurator
ciphers
in interface SecurityConfigurator
ciphers
- the ciphers to use.this
.ServerSecurityConfigurator sessionCacheSize(long sessionCacheSize)
SecurityConfigurator
sessionCacheSize
in interface SecurityConfigurator
sessionCacheSize
- the cache size.this
.ServerSecurityConfigurator sessionTimeout(long sessionTimeout)
SecurityConfigurator
sessionTimeout
in interface SecurityConfigurator
sessionTimeout
- the session timeout.this
.ServerSecurityConfigurator provider(SecurityConfigurator.SslProvider provider)
SecurityConfigurator
SecurityConfigurator.SslProvider
to use.provider
in interface SecurityConfigurator
provider
- the provider.this
.ServerSecurityConfigurator clientAuth(ServerSecurityConfigurator.ClientAuth clientAuth)
clientAuth
- the auth configuration to use.this
.