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 KeystoreEditorMBeanpublic List<Map<String,Object>> getTruststore()
getTruststore in interface KeystoreEditorMBeanpublic void addPrivateKey(String alias, String keyPassword, String storePassword, String data, String type, String fileName) throws KeystoreEditor.KeystoreEditorException
addPrivateKey in interface KeystoreEditorMBeanKeystoreEditor.KeystoreEditorExceptionpublic void addTrustedCertificate(String alias, String keyPassword, String storePassword, String data, String type, String fileName) throws KeystoreEditor.KeystoreEditorException
addTrustedCertificate in interface KeystoreEditorMBeanKeystoreEditor.KeystoreEditorExceptionpublic List<Map<String,Object>> addTrustedCertificateFromUrl(String url)
addTrustedCertificateFromUrl in interface KeystoreEditorMBeanpublic List<Map<String,Object>> certificateDetails(String url)
certificateDetails in interface KeystoreEditorMBeanpublic List<String> replaceSystemStores(String fqdn, String keyPassword, String keystorePassword, String keystoreData, String keystoreFileName, String truststorePassword, String truststoreData, String truststoreFileName) throws KeystoreEditor.KeystoreEditorException
KeystoreEditorMBeanreplaceSystemStores in interface KeystoreEditorMBeanfqdn - 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.KeystoreEditorExceptionpublic void deletePrivateKey(String alias)
deletePrivateKey in interface KeystoreEditorMBeanpublic void deleteTrustedCertificate(String alias)
deleteTrustedCertificate in interface KeystoreEditorMBeanThis work is licensed under a Creative Commons Attribution 4.0 International License.