1 13 14 package org.ejbca.ui.cli; 15 16 21 public class CaCreateCrlCommand extends BaseCaAdminCommand { 22 27 public CaCreateCrlCommand(String [] args) { 28 super(args); 29 } 30 31 37 public void execute() throws IllegalAdminCommandException, ErrorAdminCommandException { 38 if (args.length < 1) { 39 throw new IllegalAdminCommandException("Usage: CA createcrl <caname>" + 40 "If no caname is given then will CRLs for all neccessary CAs be created."); 41 } 42 43 if (args.length == 1) { 44 try{ 45 createCRL((String ) null); 46 } catch (Exception e) { 47 throw new ErrorAdminCommandException(e); 48 } 49 } 50 51 if(args.length == 2){ 52 try { 53 String caname = args[1]; 54 createCRL(getIssuerDN(caname)); 56 } catch (Exception e) { 57 throw new ErrorAdminCommandException(e); 58 } 59 } 60 } 61 62 } 64 | Popular Tags |