Search in sources :

Example 1 with NodeKeystoreManager

use of com.sun.enterprise.admin.servermgmt.NodeKeystoreManager in project Payara by payara.

the class ChangeNodeMasterPasswordCommand method encryptKeystore.

/*
     * This will encrypt the keystore
     */
public void encryptKeystore(String f) throws CommandException {
    RepositoryConfig nodeConfig = new RepositoryConfig(f, new File(nodeDir, node).toString(), f);
    NodeKeystoreManager km = new NodeKeystoreManager();
    try {
        km.encryptKeystore(nodeConfig, oldPassword, newPassword);
    } catch (Exception e) {
        throw new CommandException(strings.get("Keystore.not.encrypted"), e);
    }
}
Also used : RepositoryConfig(com.sun.enterprise.admin.servermgmt.RepositoryConfig) NodeKeystoreManager(com.sun.enterprise.admin.servermgmt.NodeKeystoreManager) CommandException(org.glassfish.api.admin.CommandException) File(java.io.File) MiniXmlParserException(com.sun.enterprise.universal.xml.MiniXmlParserException) CommandException(org.glassfish.api.admin.CommandException)

Aggregations

NodeKeystoreManager (com.sun.enterprise.admin.servermgmt.NodeKeystoreManager)1 RepositoryConfig (com.sun.enterprise.admin.servermgmt.RepositoryConfig)1 MiniXmlParserException (com.sun.enterprise.universal.xml.MiniXmlParserException)1 File (java.io.File)1 CommandException (org.glassfish.api.admin.CommandException)1