FileDocCategorySizeDatePackage
ARG_nsspwdfile.javaAPI DocGlassfish v2 API3447Fri May 04 22:35:06 BST 2007com.sun.enterprise.tools.upgrade.common.arguments

ARG_nsspwdfile

public class ARG_nsspwdfile extends CertificateArgumentHandler
author
Hans Hrasna

Fields Summary
String
nssPwdFile
Constructors Summary
public ARG_nsspwdfile(ParsedArgument pa)
Creates a new instance of ARG_nsspwdfile

        super(pa);
        if (parameters.isEmpty()) {
            helpUsage(sm.getString("enterprise.tools.upgrade.cli.argument_missing, --nsspwdfile/-n"));
            System.exit(1);
        }
        nssPwdFile = (String)parameters.firstElement();
        processCertificatePasswords(nssPwdFile);
    
Methods Summary
protected voidsetCertificatePassword(java.lang.String password)

        if(password == null) {
            _logger.severe(sm.getString("enterprise.tools.upgrade.cli.password_error", nssPwdFile));
            System.exit(1);
        }
        commonInfo.setCertDbPassword(password);
        commonInfo.setNSSPwdFile(nssPwdFile);
        if(!interactiveMap.containsKey("source"))
            return;
        boolean validpwd = PasswordVerifier.verifySourceNSSPassword(commonInfo);
        if(!validpwd) {
            commonInfo.recover();
            _logger.severe(sm.getString("enterprise.tools.upgrade.cli.Invalid_nss_password"));
            System.exit(1);
        }
        interactiveMap.put(ArgsParser.NSSPWD + "-" + commonInfo.getCurrentDomain(), password);