Package org.springframework.boot.ssl
Interface SslOptions
public interface SslOptions
Configuration options that should be applied when establishing an SSL connection.
- Since:
- 3.1.0
- Author:
- Scott Frederick
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionHelper method that provides a null-safe way to convert aString[]
to aCollection
for client libraries to use.String[]
Return the ciphers that can be used or an empty set.String[]
Return the protocols that should be enabled or an empty set.default boolean
Return if any SSL options have been specified.static SslOptions
Factory method to create a newSslOptions
instance.static SslOptions
Factory method to create a newSslOptions
instance.
-
Field Details
-
NONE
SslOptions
that returnsnull
results.
-
-
Method Details
-
isSpecified
default boolean isSpecified()Return if any SSL options have been specified.- Returns:
true
if SSL options have been specified
-
getCiphers
String[] getCiphers()Return the ciphers that can be used or an empty set. The cipher names in this set should be compatible with those supported bySSLEngine.getSupportedCipherSuites()
.- Returns:
- the ciphers that can be used or
null
-
getEnabledProtocols
String[] getEnabledProtocols()Return the protocols that should be enabled or an empty set. The protocols names in this set should be compatible with those supported bySSLEngine.getSupportedProtocols()
.- Returns:
- the protocols to enable or
null
-
of
Factory method to create a newSslOptions
instance.- Parameters:
ciphers
- the ciphersenabledProtocols
- the enabled protocols- Returns:
- a new
SslOptions
instance
-
of
Factory method to create a newSslOptions
instance.- Parameters:
ciphers
- the ciphersenabledProtocols
- the enabled protocols- Returns:
- a new
SslOptions
instance
-
asSet
Helper method that provides a null-safe way to convert aString[]
to aCollection
for client libraries to use.- Parameters:
array
- the array to convert- Returns:
- a collection or
null
-