public class SSLConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SSLConfiguration.Builder
Build an instance of
SSLConfiguration using builder pattern |
| Modifier and Type | Field and Description |
|---|---|
String |
keyStoreFilePassword
Password that is used to encrypt the keystore file.
|
String |
keyStoreFilePath
Keystore file name with relative/absolute path.
|
String |
keyStoreKeyPassword
Password that is used to encrypt the key inside keystore file.
|
String |
keyStoreType
Type of the keystore it should use.
|
String |
keyType
Type of the Key the keystore file has.
|
boolean |
needClientAuth
This value should be true, when server want to cease communication if client doesn't send client credentials
or client send some invalid credentials.
|
String |
sslVersion
TLSv1, TLSv2 etc
|
boolean |
trustAllCerts
This value should be set to true if it is supposed to trust all the certificates from the remote side.
|
boolean |
useKeystoreFile
This value should be set to true if it is supposed to use a keystore file to validate the connection.
|
boolean |
wantClientAuth
This value should be true, when server want to know the client credentials if client sends them,
but server don't want to cease communication if client doesn't.
|
| Modifier and Type | Method and Description |
|---|---|
static SSLConfiguration.Builder |
builder()
Create a builder for
SSLConfiguration |
public String keyStoreType
KeyStoreType.JKSpublic String keyStoreFilePath
public String keyStoreFilePassword
keyStoreKeyPassword
First a file is encrypted using keyStoreFilePassword and inside the file private key is again
encrypted using this password.
while creating jks file from pkcs12 file using keytool we are asked for two password
Enter destination keystore password: this is actually keyStoreFilePassword
Enter source keystore password: this is actually keyStoreKeyPasswordpublic String keyStoreKeyPassword
keyStoreFilePassword and inside the file private key is again
encrypted using this password.
while creating jks file from pkcs12 file using keytool we are asked for two password
Enter destination keystore password: this is actually keyStoreFilePassword
Enter source keystore password: this is actually keyStoreKeyPasswordpublic String sslVersion
public boolean trustAllCerts
public boolean useKeystoreFile
keyStoreFilePath must contain the valid path of a keystore
and keyStoreFilePassword, keyStoreKeyPassword, keyStoreType must provide
corresponding value properly.public boolean wantClientAuth
public boolean needClientAuth
public static SSLConfiguration.Builder builder()
SSLConfigurationCopyright © 2022. All rights reserved.