public class KeystoreEditor extends Object implements KeystoreEditorMBean
Modifier and Type | Class and Description |
---|---|
static class |
KeystoreEditor.KeystoreEditorException |
Modifier and Type | Field and Description |
---|---|
protected static String |
CERT_TYPE |
protected static String |
DER_TYPE |
protected static String |
JKS_TYPE |
protected static String |
PEM_TYPE |
protected static String |
PKCS12_TYPE |
protected static String |
PKCS7_TYPE |
Constructor and Description |
---|
KeystoreEditor() |
Modifier and Type | Method and Description |
---|---|
void |
addPrivateKey(String alias,
String keyPassword,
String storePassword,
String data,
String type,
String fileName) |
void |
addTrustedCertificate(String alias,
String keyPassword,
String storePassword,
String data,
String type,
String fileName) |
List<Map<String,Object>> |
addTrustedCertificateFromUrl(String url) |
List<Map<String,Object>> |
certificateDetails(String url) |
void |
deletePrivateKey(String alias) |
void |
deleteTrustedCertificate(String alias) |
List<Map<String,Object>> |
getKeystore() |
List<Map<String,Object>> |
getTruststore() |
List<String> |
replaceSystemStores(String fqdn,
String keyPassword,
String keystorePassword,
String keystoreData,
String keystoreFileName,
String truststorePassword,
String truststoreData,
String truststoreFileName)
Replaces the system stores (keystore and truststore) with the passed in stores.
|
protected static final String CERT_TYPE
protected static final String PEM_TYPE
protected static final String DER_TYPE
protected static final String PKCS7_TYPE
protected static final String PKCS12_TYPE
protected static final String JKS_TYPE
public List<Map<String,Object>> getKeystore()
getKeystore
in interface KeystoreEditorMBean
public List<Map<String,Object>> getTruststore()
getTruststore
in interface KeystoreEditorMBean
public void addPrivateKey(String alias, String keyPassword, String storePassword, String data, String type, String fileName) throws KeystoreEditor.KeystoreEditorException
addPrivateKey
in interface KeystoreEditorMBean
KeystoreEditor.KeystoreEditorException
public void addTrustedCertificate(String alias, String keyPassword, String storePassword, String data, String type, String fileName) throws KeystoreEditor.KeystoreEditorException
addTrustedCertificate
in interface KeystoreEditorMBean
KeystoreEditor.KeystoreEditorException
public List<Map<String,Object>> addTrustedCertificateFromUrl(String url)
addTrustedCertificateFromUrl
in interface KeystoreEditorMBean
public List<Map<String,Object>> certificateDetails(String url)
certificateDetails
in interface KeystoreEditorMBean
public List<String> replaceSystemStores(String fqdn, String keyPassword, String keystorePassword, String keystoreData, String keystoreFileName, String truststorePassword, String truststoreData, String truststoreFileName) throws KeystoreEditor.KeystoreEditorException
KeystoreEditorMBean
replaceSystemStores
in interface KeystoreEditorMBean
fqdn
- fully qualified domain name used to validate the keystore. The keystore must
contain a key with an alias matching the fqdnkeyPassword
- password for private keykeystorePassword
- password for the keystoreDatakeystoreData
- keystore file data (base 64 encoded)keystoreFileName
- keystore filenametruststorePassword
- password for the truststoreDatatruststoreData
- truststore file data (base 64 encoded)truststoreFileName
- truststore filenameKeystoreEditor.KeystoreEditorException
public void deletePrivateKey(String alias)
deletePrivateKey
in interface KeystoreEditorMBean
public void deleteTrustedCertificate(String alias)
deleteTrustedCertificate
in interface KeystoreEditorMBean
This work is licensed under a Creative Commons Attribution 4.0 International License.