public class SSLContextParameters extends BaseSSLContextParameters
SSLContext configuration options used in instantiating an SSLContext instance.BaseSSLContextParameters.SSLContextDecorator, BaseSSLContextParameters.SSLContextSpiDecorator, BaseSSLContextParameters.SSLServerSocketFactoryDecorator, BaseSSLContextParameters.SSLSocketFactoryDecorator| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_SECURE_SOCKET_PROTOCOL |
DEFAULT_CIPHER_SUITES_FILTER_EXCLUDE, DEFAULT_CIPHER_SUITES_FILTER_INCLUDE, DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_EXCLUDE, DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_INCLUDE| Constructor and Description |
|---|
SSLContextParameters() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureSSLContext(SSLContext context)
Configures the actual
SSLContext itself with direct setter calls. |
SSLContext |
createSSLContext(CamelContext camelContext)
Creates an
SSLContext based on the related configuration options of this instance. |
String |
getCertAlias() |
SSLContextClientParameters |
getClientParameters() |
KeyManagersParameters |
getKeyManagers() |
String |
getProvider() |
SecureRandomParameters |
getSecureRandom() |
String |
getSecureSocketProtocol() |
SSLContextServerParameters |
getServerParameters() |
protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> |
getSSLEngineConfigurers(SSLContext context)
Returns the list of configurers to apply to an
SSLEngine in order to fully configure it in compliance
with the provided configuration options. |
protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> |
getSSLServerSocketFactoryConfigurers(SSLContext context)
Returns the list of configurers to apply to an
SSLServerSocketFactory in order to fully configure it in
compliance with the provided configuration options. |
protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> |
getSSLSocketFactoryConfigurers(SSLContext context)
Returns the list of configurers to apply to an
SSLSocketFactory in order to fully configure it in
compliance with the provided configuration options. |
TrustManagersParameters |
getTrustManagers() |
void |
setCertAlias(String certAlias)
An optional certificate alias to use.
|
void |
setClientParameters(SSLContextClientParameters clientParameters)
The optional configuration options to be applied purely to the client side settings of the
SSLContext. |
void |
setKeyManagers(KeyManagersParameters keyManagers)
Sets the optional key manager configuration for creating the
KeyManagers used in constructing an
SSLContext. |
void |
setProvider(String provider)
Sets the optional provider identifier to use when constructing an
SSLContext. |
void |
setSecureRandom(SecureRandomParameters secureRandom)
Sets the optional secure random configuration options to use for constructing the
SecureRandom used in
the creation of an SSLContext. |
void |
setSecureSocketProtocol(String secureSocketProtocol)
Sets the optional protocol for the secure sockets created by the
SSLContext represented by this
instance's configuration. |
void |
setServerParameters(SSLContextServerParameters serverParameters)
The optional configuration options to be applied purely to the server side settings of the
SSLContext. |
void |
setTrustManagers(TrustManagersParameters trustManagers)
Sets the optional trust manager configuration for creating the
TrustManagers used in constructing an
SSLContext. |
String |
toString() |
configureSessionContext, filter, filter, getAllowPassthrough, getCipherSuites, getCipherSuitesFilter, getDefaultCipherSuitesFilter, getDefaultSecureSocketProcotolFilter, getSecureSocketProtocols, getSecureSocketProtocolsFilter, getSessionTimeout, getSNIHostNames, getSSLServerSocketFactorySSLServerSocketConfigurers, getSSLSocketFactorySSLSocketConfigurers, matchesOneOf, setCipherSuites, setCipherSuitesFilter, setSecureSocketProtocols, setSecureSocketProtocolsFilter, setSessionTimeoutgetCamelContext, parsePropertyValue, parsePropertyValues, resolveResource, setCamelContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittrySetCamelContextprotected static final String DEFAULT_SECURE_SOCKET_PROTOCOL
public KeyManagersParameters getKeyManagers()
public void setKeyManagers(KeyManagersParameters keyManagers)
KeyManagers used in constructing an
SSLContext.keyManagers - the options or null to provide no KeyManagerspublic TrustManagersParameters getTrustManagers()
public void setTrustManagers(TrustManagersParameters trustManagers)
TrustManagers used in constructing an
SSLContext.trustManagers - the options or null to provide no TrustManagerspublic SecureRandomParameters getSecureRandom()
public void setSecureRandom(SecureRandomParameters secureRandom)
SecureRandom used in
the creation of an SSLContext.secureRandom - the options or null to use the defaultpublic SSLContextClientParameters getClientParameters()
public void setClientParameters(SSLContextClientParameters clientParameters)
SSLContext.
Settings specified here override any duplicate settings provided at the overall level by this class. These
parameters apply to SSLSocketFactorys and SSLEngines produced by the SSLContext produced
from this class as well as to the SSLContext itself.clientParameters - the optional additional client-side parameterspublic SSLContextServerParameters getServerParameters()
public void setServerParameters(SSLContextServerParameters serverParameters)
SSLContext.
Settings specified here override any duplicate settings provided at the overall level by this class. These
parameters apply to SSLServerSocketFactorys and SSLEngines produced by the SSLContext
produced from this class as well as to the SSLContext itself.serverParameters - the optional additional client-side parameterspublic String getProvider()
public void setProvider(String provider)
SSLContext.provider - the identifier (from the list of available providers returned by Security.getProviders())
or null to use the highest priority provider implementing the secure socket protocolSecurity.getProviders(java.util.Map),
setSecureSocketProtocol(String)public String getSecureSocketProtocol()
public void setSecureSocketProtocol(String secureSocketProtocol)
SSLContext represented by this
instance's configuration. Defaults to TLS. See Appendix A in the
Java
Secure Socket Extension Reference Guide for information about standard protocol names.secureSocketProtocol - the name of the protocol or null to use the default (TLS)public String getCertAlias()
public void setCertAlias(String certAlias)
certAlias - an optional certificate alias to usepublic SSLContext createSSLContext(CamelContext camelContext) throws GeneralSecurityException, IOException
SSLContext based on the related configuration options of this instance. Namely,
keyManagers, trustManagers, and secureRandom, but also respecting the chosen provider
and secure socket protocol as well.camelContext - The camel contextGeneralSecurityException - if there is a problem in this instances configuration or that of its nested
configuration optionsIOException - if there is an error reading a key/trust storeprotected void configureSSLContext(SSLContext context) throws GeneralSecurityException
BaseSSLContextParametersSSLContext itself with direct setter calls. This method differs from configuration
options that are handled by a configurer instance in that the options are part of the context itself and are not
part of some factory or instance object returned by the context.configureSSLContext in class BaseSSLContextParameterscontext - the context to configureGeneralSecurityException - if there is an error configuring the contextprotected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> getSSLEngineConfigurers(SSLContext context)
BaseSSLContextParametersSSLEngine in order to fully configure it in compliance
with the provided configuration options. The configurers are to be applied in the order in which they appear in
the list.getSSLEngineConfigurers in class BaseSSLContextParameterscontext - the context that serves as the factory for SSLEngine instancesprotected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> getSSLSocketFactoryConfigurers(SSLContext context)
BaseSSLContextParametersSSLSocketFactory in order to fully configure it in
compliance with the provided configuration options. The configurers are to be applied in the order in which they
appear in the list.
It is preferred to use BaseSSLContextParameters.getSSLSocketFactorySSLSocketConfigurers(SSLContext) instead of this method as
SSLSocketFactory does not contain any configuration options that are non-proprietary.getSSLSocketFactoryConfigurers in class BaseSSLContextParameterscontext - the context that serves as the factory for SSLSocketFactory instancesBaseSSLContextParameters.getSSLSocketFactorySSLSocketConfigurers(SSLContext)protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> getSSLServerSocketFactoryConfigurers(SSLContext context)
BaseSSLContextParametersSSLServerSocketFactory in order to fully configure it in
compliance with the provided configuration options. The configurers are to be applied in the order in which they
appear in the list.
It is preferred to use BaseSSLContextParameters.getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext) instead of this
method as SSLServerSocketFactory does not contain any configuration options that are non-proprietary.getSSLServerSocketFactoryConfigurers in class BaseSSLContextParameterscontext - the context that serves as the factory for SSLServerSocketFactory instancesBaseSSLContextParameters.getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext)Apache Camel