Class KeystoreEditor
java.lang.Object
org.codice.ddf.security.certificate.keystore.editor.KeystoreEditor
- All Implemented Interfaces:
KeystoreEditorMBean
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPrivateKey(String alias, String keyPassword, String storePassword, String data, String type, String fileName) voidaddTrustedCertificate(String alias, String keyPassword, String storePassword, String data, String type, String fileName) certificateDetails(String url) voiddeletePrivateKey(String alias) voiddeleteTrustedCertificate(String alias) 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.voidsetSecurityLogger(ddf.security.audit.SecurityLogger securityLogger)
-
Field Details
-
CERT_TYPE
- See Also:
-
X509
- See Also:
-
PEM_TYPE
- See Also:
-
DER_TYPE
- See Also:
-
PKCS7_TYPE
- See Also:
-
PKCS12_TYPE
- See Also:
-
JKS_TYPE
- See Also:
-
DDF_HOME
- See Also:
-
NULL_ALIAS_MSG
- See Also:
-
-
Constructor Details
-
KeystoreEditor
public KeystoreEditor()
-
-
Method Details
-
setSecurityLogger
public void setSecurityLogger(ddf.security.audit.SecurityLogger securityLogger) -
getKeystore
- Specified by:
getKeystorein interfaceKeystoreEditorMBean
-
getTruststore
- Specified by:
getTruststorein interfaceKeystoreEditorMBean
-
addPrivateKey
public void addPrivateKey(String alias, String keyPassword, String storePassword, String data, String type, String fileName) throws KeystoreEditor.KeystoreEditorException - Specified by:
addPrivateKeyin interfaceKeystoreEditorMBean- Throws:
KeystoreEditor.KeystoreEditorException
-
addTrustedCertificate
public void addTrustedCertificate(String alias, String keyPassword, String storePassword, String data, String type, String fileName) throws KeystoreEditor.KeystoreEditorException - Specified by:
addTrustedCertificatein interfaceKeystoreEditorMBean- Throws:
KeystoreEditor.KeystoreEditorException
-
addTrustedCertificateFromUrl
- Specified by:
addTrustedCertificateFromUrlin interfaceKeystoreEditorMBean
-
certificateDetails
- Specified by:
certificateDetailsin interfaceKeystoreEditorMBean
-
replaceSystemStores
public List<String> replaceSystemStores(String fqdn, String keyPassword, String keystorePassword, String keystoreData, String keystoreFileName, String truststorePassword, String truststoreData, String truststoreFileName) throws KeystoreEditor.KeystoreEditorException Description copied from interface:KeystoreEditorMBeanReplaces the system stores (keystore and truststore) with the passed in stores. All entries in the current stores will be lost.- Specified by:
replaceSystemStoresin interfaceKeystoreEditorMBean- Parameters:
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 filename- Returns:
- Returns a list containing any error messages. If call was successfull this will be an empty list.
- Throws:
KeystoreEditor.KeystoreEditorException
-
deletePrivateKey
- Specified by:
deletePrivateKeyin interfaceKeystoreEditorMBean
-
deleteTrustedCertificate
- Specified by:
deleteTrustedCertificatein interfaceKeystoreEditorMBean
-