Package org.springframework.boot.ssl
Interface SslBundle
- All Known Implementing Classes:
PropertiesSslBundle,WebServerSslBundle
public interface SslBundle
A bundle of trust material that can be used to establish an SSL connection.
- Since:
- 3.1.0
- Author:
- Scott Frederick, Moritz Halbritter
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault SSLContextFactory method to create a newSSLContextfor this bundle.getKey()Return a reference to the key that should be used for this bundle orSslBundleKey.NONE.ReturnSslOptionsthat should be applied when establishing the SSL connection.Return the protocol to use when establishing the connection.Return theSslStoreBundlethat can be used to access this bundle's key and trust stores.static SslBundleof(SslStoreBundle stores) Factory method to create a newSslBundleinstance.static SslBundleof(SslStoreBundle stores, SslBundleKey key) Factory method to create a newSslBundleinstance.static SslBundleof(SslStoreBundle stores, SslBundleKey key, SslOptions options) Factory method to create a newSslBundleinstance.static SslBundleof(SslStoreBundle stores, SslBundleKey key, SslOptions options, String protocol) Factory method to create a newSslBundleinstance.static SslBundleof(SslStoreBundle stores, SslBundleKey key, SslOptions options, String protocol, SslManagerBundle managers) Factory method to create a newSslBundleinstance.static SslBundleFactory method to create a newSslBundlewhich uses the system defaults.
-
Field Details
-
DEFAULT_PROTOCOL
The default protocol to use.- See Also:
-
-
Method Details
-
getStores
SslStoreBundle getStores()Return theSslStoreBundlethat can be used to access this bundle's key and trust stores.- Returns:
- the
SslStoreBundleinstance for this bundle
-
getKey
SslBundleKey getKey()Return a reference to the key that should be used for this bundle orSslBundleKey.NONE.- Returns:
- a reference to the SSL key that should be used
-
getOptions
SslOptions getOptions()ReturnSslOptionsthat should be applied when establishing the SSL connection.- Returns:
- the options that should be applied
-
getProtocol
String getProtocol()Return the protocol to use when establishing the connection. Values should be supported bySSLContext.getInstance(String).- Returns:
- the SSL protocol
- See Also:
-
getManagers
SslManagerBundle getManagers()- Returns:
- the
SslManagerBundleinstance for this bundle
-
createSslContext
Factory method to create a newSSLContextfor this bundle.- Returns:
- a new
SSLContextinstance
-
of
Factory method to create a newSslBundleinstance.- Parameters:
stores- the stores ornull- Returns:
- a new
SslBundleinstance
-
of
Factory method to create a newSslBundleinstance.- Parameters:
stores- the stores ornullkey- the key ornull- Returns:
- a new
SslBundleinstance
-
of
Factory method to create a newSslBundleinstance.- Parameters:
stores- the stores ornullkey- the key ornulloptions- the options ornull- Returns:
- a new
SslBundleinstance
-
of
Factory method to create a newSslBundleinstance.- Parameters:
stores- the stores ornullkey- the key ornulloptions- the options ornullprotocol- the protocol ornull- Returns:
- a new
SslBundleinstance
-
of
static SslBundle of(SslStoreBundle stores, SslBundleKey key, SslOptions options, String protocol, SslManagerBundle managers) Factory method to create a newSslBundleinstance.- Parameters:
stores- the stores ornullkey- the key ornulloptions- the options ornullprotocol- the protocol ornullmanagers- the managers ornull- Returns:
- a new
SslBundleinstance
-
systemDefault
Factory method to create a newSslBundlewhich uses the system defaults.- Returns:
- a new
SslBundleinstance - Since:
- 3.5.0
-