public class KeyStoreDetails
extends java.lang.Object
Configuration| Modifier and Type | Class and Description |
|---|---|
static class |
KeyStoreDetails.KeyStoreFormat |
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
keyStoreFile |
protected KeyStoreDetails.KeyStoreFormat |
keyStoreFormat |
protected java.lang.String |
keyStorePassword |
protected java.lang.String |
privateKeyPassword |
| Constructor and Description |
|---|
KeyStoreDetails()
When using this constructor we must ensure
validate() return true |
KeyStoreDetails(KeyStoreDetails other)
Copy constructor
|
KeyStoreDetails(java.lang.String storepass,
java.lang.String keypass,
java.io.File keyStoreFile)
Parameters to create a KeyStore with JKS as default keystore
|
KeyStoreDetails(java.lang.String storepass,
java.lang.String keypass,
java.io.File keyStoreFile,
KeyStoreDetails.KeyStoreFormat keyStoreFormat)
Full constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getKeyStoreFile()
The file pointing to the keystore
|
KeyStoreDetails.KeyStoreFormat |
getKeyStoreFormat()
The format of the keystore
|
java.lang.String |
getKeyStorePassword() |
java.lang.String |
getPrivateKeyPassword()
The password used to encrypt the private keys.
|
void |
setKeyStoreFile(java.io.File keyStoreFile)
Where to save the file
|
void |
setKeyStoreFormat(KeyStoreDetails.KeyStoreFormat keyStoreFormat)
Format of the keystore.
|
void |
setKeyStorePassword(java.lang.String storepass)
Password of the keystore file, protect the integrity of the file
|
void |
setPrivateKeyPassword(java.lang.String keypass)
Password of the Private Key in the KeyStore
|
void |
validate() |
protected java.lang.String keyStorePassword
protected java.lang.String privateKeyPassword
protected java.io.File keyStoreFile
protected KeyStoreDetails.KeyStoreFormat keyStoreFormat
public KeyStoreDetails()
validate() return truepublic KeyStoreDetails(KeyStoreDetails other)
other - the key store we want to copypublic KeyStoreDetails(java.lang.String storepass,
java.lang.String keypass,
java.io.File keyStoreFile,
KeyStoreDetails.KeyStoreFormat keyStoreFormat)
storepass - The main password for the KeyStore, protect from tempering with
the filekeypass - The password of the primate key, used to extract itkeyStoreFile - Where to save the filekeyStoreFormat - Which format to save the KeyStore: JKS, PKCS12 (may have issue)public KeyStoreDetails(java.lang.String storepass,
java.lang.String keypass,
java.io.File keyStoreFile)
storepass - The main password for the KeyStore, protect from tempering with
the filekeypass - The password of the primate key, used to extract itkeyStoreFile - Where to save the filepublic java.lang.String getKeyStorePassword()
public void setKeyStorePassword(java.lang.String storepass)
storepass - the new key store passwordpublic java.lang.String getPrivateKeyPassword()
public void setPrivateKeyPassword(java.lang.String keypass)
keypass - the new password of the keypublic java.io.File getKeyStoreFile()
public void setKeyStoreFile(java.io.File keyStoreFile)
keyStoreFile - the new keystore locationpublic KeyStoreDetails.KeyStoreFormat getKeyStoreFormat()
public void setKeyStoreFormat(KeyStoreDetails.KeyStoreFormat keyStoreFormat)
keyStoreFormat - the new format of the keystorepublic void validate()
java.security.InvalidParameterException - when something is set incorrectly for creating a new KeyStore