Creates a new instance of ARG_noprompt
super(pa);
commonInfo.setNoprompt(true);
//Silent upgrade support with default values
if (commonInfo.getAdminUserName() == null){
commonInfo.setAdminUserName(defaultAdminUser);
interactiveMap.put(ArgsParser.ADMINUSER,defaultAdminUser);
}
if (commonInfo.getAdminPassword() == null){
commonInfo.setAdminPassword(defaultAdminPassword);
interactiveMap.put(ArgsParser.ADMINPASSWORD,defaultAdminPassword);
}
if (commonInfo.getMasterPassword() == null) {
commonInfo.setMasterPassword(defaultMasterPassword);
}
// set up silent certificate upgrade
commonInfo.setCertificateConversionFlag(true);
List domainList = commonInfo.getDomainList();
Iterator it = domainList.iterator();
while (it.hasNext()){
//attempt certificate migration for each domain
String domainName = (String)it.next();
commonInfo.setCurrentDomain(domainName);
//commonInfo.setJksCAKeystorePassword(password);
String password = UpgradeUtils.getUpgradeUtils(commonInfo).getJvmOptionValueFromSourceConfig("javax.net.ssl.keyStorePassword");
if(password == null) {
password = commonInfo.getMasterPassword();
}
commonInfo.setJksKeystorePassword(password);
String trustPassword = UpgradeUtils.getUpgradeUtils(commonInfo).getJvmOptionValueFromSourceConfig("javax.net.ssl.trustStorePassword");
if(trustPassword == null) {
trustPassword = commonInfo.getMasterPassword();
}
commonInfo.setJksCAKeystorePassword(trustPassword);
commonInfo.addDomainOptionName(domainName);
interactiveMap.put(ArgsParser.DOMAIN + "-" + commonInfo.getCurrentDomain(), domainName);
interactiveMap.put(ArgsParser.JKSPWD + "-" + domainName, password);
interactiveMap.put(ArgsParser.CAPWD + "-" + domainName, password);
interactiveMap.put(ArgsParser.NSSPWD + "-" + domainName, password);
interactiveMap.put(ArgsParser.TARGETNSSPWD + "-" + domainName, password);
commonInfo.setCertDbPassword(commonInfo.getCurrentDomain(), password);
String jksPath=commonInfo.getSourceJKSKeyStorePath();
if(!PasswordVerifier.verifyKeystorePassword(jksPath,password )) {
commonInfo.recover();
_logger.severe(sm.getString("enterprise.tools.upgrade.cli.Invalid_jks_keypair_password"));
System.exit(1);
}
String trustJksPath = commonInfo.getSourceTrustedJKSKeyStorePath();
if(!PasswordVerifier.verifyKeystorePassword(trustJksPath,trustPassword)) {
commonInfo.recover();
_logger.severe(sm.getString("enterprise.tools.upgrade.cli.Invalid_jks_CA_password"));
System.exit(1);
}
}