Package org.ejbca.ui.cli

Examples of org.ejbca.ui.cli.IllegalAdminCommandException


        try {           
          Properties props = new Properties();
          props.load(new FileInputStream(args[1]));
          // Read the significant issuer dn and check that it exists
          if(props.getProperty("significantissuerdn") == null){
            throw new IllegalAdminCommandException("Error, the property significantissuerdn isn't set in the propertyfile " + args[1]);
          }
          String significantIssuerDN = props.getProperty("significantissuerdn");
          int cAId = significantIssuerDN.hashCode();
          if(ejb.getCAAdminSession().getCAInfo(getAdmin(), cAId) == null){
            throw new IllegalAdminCommandException("Error, the property significantissuerdn '" + significantIssuerDN +  "' doesn't exists as CA in the system.");
          }
          // Create the importer
          if(props.getProperty("importer.classpath") == null){
            throw new IllegalAdminCommandException("Error, the property importer.classpath isn't set in the propertyfile " + args[1]);
          }
          IHardTokenImporter importer =  (IHardTokenImporter) Thread.currentThread().getContextClassLoader().loadClass(props.getProperty("importer.classpath")).newInstance();
          importer.startImport(props);
          HardTokenData htd;
          try{
View Full Code Here


            String catokenproperties = null;
            if (args.length > 10 && !"soft".equals(catokentype)) {
              String filename = args[10];
              if ( (filename != null) && (!filename.equalsIgnoreCase("null")) ) {
                  if (!(new File(filename)).exists()) {
                    throw new IllegalAdminCommandException("File " + filename + " does not exist");
                  }
                    catokenproperties = new String(FileTools.readFiletoBuffer(filename));               
              }
            }
            int signedByCAId = CAInfo.SELFSIGNED;
View Full Code Here

TOP

Related Classes of org.ejbca.ui.cli.IllegalAdminCommandException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.