public class SSLContextFactoryBean
extends java.lang.Object
SSLContext
.
This object holds the configurable properties for an SSL context and uses
them to create an SSLContext
instance.
Constructor and Description |
---|
SSLContextFactoryBean() |
Modifier and Type | Method and Description |
---|---|
javax.net.ssl.SSLContext |
createContext(ContextAware context)
Creates a new
SSLContext using the receiver's configuration. |
KeyManagerFactoryFactoryBean |
getKeyManagerFactory()
Gets the key manager factory configuration.
|
KeyStoreFactoryBean |
getKeyStore()
Gets the key store configuration.
|
java.lang.String |
getProtocol()
Gets the secure transport protocol name.
|
java.lang.String |
getProvider()
Gets the JSSE provider name for the SSL context.
|
SecureRandomFactoryBean |
getSecureRandom()
Gets the secure random generator configuration.
|
TrustManagerFactoryFactoryBean |
getTrustManagerFactory()
Gets the trust manager factory configuration.
|
KeyStoreFactoryBean |
getTrustStore()
Gets the trust store configuration.
|
void |
setKeyManagerFactory(KeyManagerFactoryFactoryBean keyManagerFactory)
Sets the key manager factory configuration.
|
void |
setKeyStore(KeyStoreFactoryBean keyStore)
Sets the key store configuration.
|
void |
setProtocol(java.lang.String protocol)
Sets the secure transport protocol name.
|
void |
setProvider(java.lang.String provider)
Sets the JSSE provider name for the SSL context.
|
void |
setSecureRandom(SecureRandomFactoryBean secureRandom)
Sets the secure random generator configuration.
|
void |
setTrustManagerFactory(TrustManagerFactoryFactoryBean trustManagerFactory)
Sets the trust manager factory configuration.
|
void |
setTrustStore(KeyStoreFactoryBean trustStore)
Sets the trust store configuration.
|
public javax.net.ssl.SSLContext createContext(ContextAware context) throws java.security.NoSuchProviderException, java.security.NoSuchAlgorithmException, java.security.KeyManagementException, java.security.UnrecoverableKeyException, java.security.KeyStoreException, java.security.cert.CertificateException
SSLContext
using the receiver's configuration.context
- context for status messagesSSLContext
objectjava.security.NoSuchProviderException
- if a provider specified for one of the
JCA or JSSE components utilized in creating the context is not
known to the platformjava.security.NoSuchAlgorithmException
- if a JCA or JSSE algorithm, protocol,
or type name specified for one of the context's components is not
known to a given provider (or platform default provider for the
component)java.security.KeyManagementException
- if an error occurs in creating a
KeyManager
for the contextjava.security.UnrecoverableKeyException
- if a private key needed by a
KeyManager
cannot be obtained from a key storejava.security.KeyStoreException
- if an error occurs in reading the
contents of a key storejava.security.cert.CertificateException
- if an error occurs in reading the
contents of a certificatepublic KeyStoreFactoryBean getKeyStore()
null
if no key store
configuration was providedpublic void setKeyStore(KeyStoreFactoryBean keyStore)
keyStore
- the key store factory bean to setpublic KeyStoreFactoryBean getTrustStore()
null
if no trust store
configuration was providedpublic void setTrustStore(KeyStoreFactoryBean trustStore)
trustStore
- the trust store factory bean to setpublic SecureRandomFactoryBean getSecureRandom()
public void setSecureRandom(SecureRandomFactoryBean secureRandom)
secureRandom
- the secure random factory bean to setpublic KeyManagerFactoryFactoryBean getKeyManagerFactory()
public void setKeyManagerFactory(KeyManagerFactoryFactoryBean keyManagerFactory)
keyManagerFactory
- the key manager factory factory bean to setpublic TrustManagerFactoryFactoryBean getTrustManagerFactory()
public void setTrustManagerFactory(TrustManagerFactoryFactoryBean trustManagerFactory)
trustManagerFactory
- the factory bean to setpublic java.lang.String getProtocol()
SSL
, TLS
); the
SSL.DEFAULT_PROTOCOL
is returned if no protocol has been
configuredpublic void setProtocol(java.lang.String protocol)
protocol
- a protocol name, which must be recognized by the provider
specified by setProvider(String)
or by the platform's
default provider if no platform was specified.public java.lang.String getProvider()
public void setProvider(java.lang.String provider)
provider
- name of the JSSE provider to use in creating the
SSL contextCopyright © 2010 - 2023 Adobe. All Rights Reserved