Used to configure SslEngineConfigurator, which will be passed to client via configuration properties.
Example:
SslContextConfigurator sslContextConfigurator = new SslContextConfigurator();
sslContextConfigurator.setTrustStoreFile("...");
sslContextConfigurator.setTrustStorePassword("...");
sslContextConfigurator.setTrustStoreType("...");
sslContextConfigurator.setKeyStoreFile("...");
sslContextConfigurator.setKeyStorePassword("...");
sslContextConfigurator.setKeyStoreType("...");
SslEngineConfigurator sslEngineConfigurator = new SslEngineConfigurator(sslContextConfigurator, true, false,
false);
client.getProperties().put(ClientManager.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);
| Modifier and Type | Field and Description |
|---|---|
| public static final SslContextConfigurator | DEFAULT_CONFIG
Default SSL configuration. |
| public static final String | KEY_FACTORY_MANAGER_ALGORITHM
Key manager factory algorithm name. |
| public static final String | KEY_STORE_FILE
Key store file name. |
| public static final String | KEY_STORE_PASSWORD
Key store file password - the password used to unlock the trust store file. |
| public static final String | KEY_STORE_PROVIDER
Key store provider name. |
| public static final String | KEY_STORE_TYPE
Key store type (see |
| private String | |
| private char[] | |
| private byte[] | |
| private String | |
| private char[] | |
| private String | |
| private String | |
| private static final Logger | LOGGER
Default Logger. |
| private String | |
| public static final String | TRUST_FACTORY_MANAGER_ALGORITHM
Trust manager factory algorithm name. |
| public static final String | TRUST_STORE_FILE
Trust store file name. |
| public static final String | TRUST_STORE_PASSWORD
Trust store file password - the password used to unlock the trust store file. |
| public static final String | TRUST_STORE_PROVIDER
Trust store provider name. |
| public static final String | TRUST_STORE_TYPE
Trust store type (see |
| private String | |
| private byte[] | |
| private String | |
| private char[] | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SslContextConfigurator(boolean
If readSystemProperties)true populates configuration from
System#getProperties(), else you have empty
configuration.Constructor that allows you creating empty configuration. |
| Modifier and Type | Method and Description |
|---|---|
| public SSLContext | |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.property map (usually taken from props)System#getProperties()).Retrieve settings from (system) properties. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.the key manager factory algorithm. keyManagerFactoryAlgorithm)Sets the key manager factory algorithm. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Password of key to set. keyPassword)Password of the key in the key store. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Password of key to set. keyPassword)Password of the key in the key store. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.key store payload. keyStoreBytes)Sets key store payload as byte array. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.File name of key store. keyStoreFile)Sets key store file name, also makes sure that if other key store configuration parameters are not set to set them to default values. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Password of key store to set. keyStorePassword)Password of key store. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Password of key store to set. keyStorePassword)Password of key store. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Key store provider to set. keyStoreProvider)Sets the key store provider name. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Type of key store to set. keyStoreType)Type of key store. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Protocol for securityProtocol)javax..Sets the SSLContext protocol. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.the trust manager factory algorithm. trustManagerFactoryAlgorithm)Sets the trust manager factory algorithm. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.trust store payload. trustStoreBytes)Sets trust store payload as byte array. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.File name of trust store. trustStoreFile)Sets trust store file name, also makes sure that if other trust store configuration parameters are not set to set them to default values. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Password of trust store to set. trustStorePassword)Password of trust store. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Trust store provider to set. trustStoreProvider)Sets the trust store provider name. |
| public SslContextConfigurator | Returns: updatedSslContextConfigurator instance.Type of trust store to set. trustStoreType)Type of trust store. |
| public boolean | Returns: true if configuration is valid, else
false.Validates |
| public boolean | Returns: true if configuration is valid, else
false.forces failure if no keystore is specified. needsKeyStore)Validates |
| DEFAULT_CONFIG | back to summary |
|---|---|
| public static final SslContextConfigurator DEFAULT_CONFIG Default SSL configuration. If you have changed any of
| |
| KEY_FACTORY_MANAGER_ALGORITHM | back to summary |
|---|---|
| public static final String KEY_FACTORY_MANAGER_ALGORITHM Key manager factory algorithm name.
The value MUST be a No default value is set.
The name of the configuration property is | |
| KEY_STORE_FILE | back to summary |
|---|---|
| public static final String KEY_STORE_FILE Key store file name.
The value MUST be a No default value is set.
The name of the configuration property is | |
| KEY_STORE_PASSWORD | back to summary |
|---|---|
| public static final String KEY_STORE_PASSWORD Key store file password - the password used to unlock the trust store file.
The value MUST be a No default value is set.
The name of the configuration property is | |
| KEY_STORE_PROVIDER | back to summary |
|---|---|
| public static final String KEY_STORE_PROVIDER Key store provider name.
The value MUST be a No default value is set.
The name of the configuration property is | |
| KEY_STORE_TYPE | back to summary |
|---|---|
| public static final String KEY_STORE_TYPE Key store type (see
The value MUST be a No default value is set.
The name of the configuration property is | |
| keyManagerFactoryAlgorithm | back to summary |
|---|---|
| private String keyManagerFactoryAlgorithm | |
| keyPassword | back to summary |
|---|---|
| private char[] keyPassword | |
| keyStoreBytes | back to summary |
|---|---|
| private byte[] keyStoreBytes | |
| keyStoreFile | back to summary |
|---|---|
| private String keyStoreFile | |
| keyStorePassword | back to summary |
|---|---|
| private char[] keyStorePassword | |
| keyStoreProvider | back to summary |
|---|---|
| private String keyStoreProvider | |
| keyStoreType | back to summary |
|---|---|
| private String keyStoreType | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER Default Logger. | |
| securityProtocol | back to summary |
|---|---|
| private String securityProtocol | |
| TRUST_FACTORY_MANAGER_ALGORITHM | back to summary |
|---|---|
| public static final String TRUST_FACTORY_MANAGER_ALGORITHM Trust manager factory algorithm name.
The value MUST be a No default value is set.
The name of the configuration property is | |
| TRUST_STORE_FILE | back to summary |
|---|---|
| public static final String TRUST_STORE_FILE Trust store file name.
The value MUST be a No default value is set.
The name of the configuration property is | |
| TRUST_STORE_PASSWORD | back to summary |
|---|---|
| public static final String TRUST_STORE_PASSWORD Trust store file password - the password used to unlock the trust store file.
The value MUST be a No default value is set.
The name of the configuration property is | |
| TRUST_STORE_PROVIDER | back to summary |
|---|---|
| public static final String TRUST_STORE_PROVIDER Trust store provider name.
The value MUST be a No default value is set.
The name of the configuration property is | |
| TRUST_STORE_TYPE | back to summary |
|---|---|
| public static final String TRUST_STORE_TYPE Trust store type (see
The value MUST be a No default value is set.
The name of the configuration property is | |
| trustManagerFactoryAlgorithm | back to summary |
|---|---|
| private String trustManagerFactoryAlgorithm | |
| trustStoreBytes | back to summary |
|---|---|
| private byte[] trustStoreBytes | |
| trustStoreFile | back to summary |
|---|---|
| private String trustStoreFile | |
| trustStorePassword | back to summary |
|---|---|
| private char[] trustStorePassword | |
| trustStoreProvider | back to summary |
|---|---|
| private String trustStoreProvider | |
| trustStoreType | back to summary |
|---|---|
| private String trustStoreType | |
| SslContextConfigurator | back to summary |
|---|---|
| public SslContextConfigurator() Default constructor. Reads configuration properties from
| |
| SslContextConfigurator | back to summary |
|---|---|
| public SslContextConfigurator(boolean readSystemProperties) Constructor that allows you creating empty configuration.
| |
| createSSLContext | back to summary |
|---|---|
| public SSLContext createSSLContext() Create
| |
| retrieve | back to summary |
|---|---|
| public SslContextConfigurator retrieve(Properties props) Retrieve settings from (system) properties.
| |
| setKeyManagerFactoryAlgorithm | back to summary |
|---|---|
| public SslContextConfigurator setKeyManagerFactoryAlgorithm(String keyManagerFactoryAlgorithm) Sets the key manager factory algorithm.
| |
| setKeyPassword | back to summary |
|---|---|
| public SslContextConfigurator setKeyPassword(String keyPassword) Password of the key in the key store.
| |
| setKeyPassword | back to summary |
|---|---|
| public SslContextConfigurator setKeyPassword(char[] keyPassword) Password of the key in the key store.
| |
| setKeyStoreBytes | back to summary |
|---|---|
| public SslContextConfigurator setKeyStoreBytes(byte[] keyStoreBytes) Sets key store payload as byte array.
Method resets key store file if any has been set before via
| |
| setKeyStoreFile | back to summary |
|---|---|
| public SslContextConfigurator setKeyStoreFile(String keyStoreFile) Sets key store file name, also makes sure that if other key store
configuration parameters are not set to set them to default values.
Method resets key store bytes if any have been set before via
| |
| setKeyStorePassword | back to summary |
|---|---|
| public SslContextConfigurator setKeyStorePassword(String keyStorePassword) Password of key store.
| |
| setKeyStorePassword | back to summary |
|---|---|
| public SslContextConfigurator setKeyStorePassword(char[] keyStorePassword) Password of key store.
| |
| setKeyStoreProvider | back to summary |
|---|---|
| public SslContextConfigurator setKeyStoreProvider(String keyStoreProvider) Sets the key store provider name.
| |
| setKeyStoreType | back to summary |
|---|---|
| public SslContextConfigurator setKeyStoreType(String keyStoreType) Type of key store.
| |
| setSecurityProtocol | back to summary |
|---|---|
| public SslContextConfigurator setSecurityProtocol(String securityProtocol) Sets the SSLContext protocol. The default value is
| |
| setTrustManagerFactoryAlgorithm | back to summary |
|---|---|
| public SslContextConfigurator setTrustManagerFactoryAlgorithm(String trustManagerFactoryAlgorithm) Sets the trust manager factory algorithm.
| |
| setTrustStoreBytes | back to summary |
|---|---|
| public SslContextConfigurator setTrustStoreBytes(byte[] trustStoreBytes) Sets trust store payload as byte array.
Method resets trust store file if any has been set before via
| |
| setTrustStoreFile | back to summary |
|---|---|
| public SslContextConfigurator setTrustStoreFile(String trustStoreFile) Sets trust store file name, also makes sure that if other trust store
configuration parameters are not set to set them to default values.
Method resets trust store bytes if any have been set before via
| |
| setTrustStorePassword | back to summary |
|---|---|
| public SslContextConfigurator setTrustStorePassword(String trustStorePassword) Password of trust store.
| |
| setTrustStoreProvider | back to summary |
|---|---|
| public SslContextConfigurator setTrustStoreProvider(String trustStoreProvider) Sets the trust store provider name.
| |
| setTrustStoreType | back to summary |
|---|---|
| public SslContextConfigurator setTrustStoreType(String trustStoreType) Type of trust store.
| |
| validateConfiguration | back to summary |
|---|---|
| public boolean validateConfiguration() Validates
| |
| validateConfiguration | back to summary |
|---|---|
| public boolean validateConfiguration(boolean needsKeyStore) Validates
| |