summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-10-11 11:41:53 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-10-25 17:01:47 -0400
commit00423180cc2fcfa97a6d9ca515588d703d7235ab (patch)
tree1659f8c770c448441cd880cbd06e93c668c6041c /base
parent4566ce7b4717d386a1204af5645687662c189fc6 (diff)
downloadpki-00423180cc2fcfa97a6d9ca515588d703d7235ab.tar.gz
pki-00423180cc2fcfa97a6d9ca515588d703d7235ab.tar.xz
pki-00423180cc2fcfa97a6d9ca515588d703d7235ab.zip
Renamed client commands.
The client-{action}-cert commands have been renamed into client-cert-{action} for consistency.
Diffstat (limited to 'base')
-rw-r--r--base/java-tools/src/com/netscape/cmstools/client/ClientCLI.java6
-rw-r--r--base/java-tools/src/com/netscape/cmstools/client/ClientCertFindCLI.java (renamed from base/java-tools/src/com/netscape/cmstools/client/ClientFindCertCLI.java)10
-rw-r--r--base/java-tools/src/com/netscape/cmstools/client/ClientCertImportCLI.java (renamed from base/java-tools/src/com/netscape/cmstools/client/ClientImportCertCLI.java)10
-rw-r--r--base/java-tools/src/com/netscape/cmstools/client/ClientCertRemoveCLI.java (renamed from base/java-tools/src/com/netscape/cmstools/client/ClientRemoveCertCLI.java)8
4 files changed, 17 insertions, 17 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/client/ClientCLI.java b/base/java-tools/src/com/netscape/cmstools/client/ClientCLI.java
index c22786150..fe0d001ac 100644
--- a/base/java-tools/src/com/netscape/cmstools/client/ClientCLI.java
+++ b/base/java-tools/src/com/netscape/cmstools/client/ClientCLI.java
@@ -32,9 +32,9 @@ public class ClientCLI extends CLI {
public ClientCLI(CLI parent) {
super("client", "Client management commands", parent);
- addModule(new ClientFindCertCLI(this));
- addModule(new ClientImportCertCLI(this));
- addModule(new ClientRemoveCertCLI(this));
+ addModule(new ClientCertFindCLI(this));
+ addModule(new ClientCertImportCLI(this));
+ addModule(new ClientCertRemoveCLI(this));
}
public String getFullName() {
diff --git a/base/java-tools/src/com/netscape/cmstools/client/ClientFindCertCLI.java b/base/java-tools/src/com/netscape/cmstools/client/ClientCertFindCLI.java
index f4057c67a..874a897a5 100644
--- a/base/java-tools/src/com/netscape/cmstools/client/ClientFindCertCLI.java
+++ b/base/java-tools/src/com/netscape/cmstools/client/ClientCertFindCLI.java
@@ -27,12 +27,12 @@ import com.netscape.cmstools.cli.MainCLI;
/**
* @author Endi S. Dewata
*/
-public class ClientFindCertCLI extends CLI {
+public class ClientCertFindCLI extends CLI {
public ClientCLI clientCLI;
- public ClientFindCertCLI(ClientCLI clientCLI) {
- super("find-cert", "Find certificates in client security database", clientCLI);
+ public ClientCertFindCLI(ClientCLI clientCLI) {
+ super("cert-find", "Find certificates in client security database", clientCLI);
this.clientCLI = clientCLI;
}
@@ -42,8 +42,6 @@ public class ClientFindCertCLI extends CLI {
public void execute(String[] args) throws Exception {
- client = clientCLI.getClient();
-
options.addOption(null, "ca", false, "Find CA certificates only");
CommandLine cmd = null;
@@ -56,6 +54,8 @@ public class ClientFindCertCLI extends CLI {
System.exit(1);
}
+ client = parent.getClient();
+
X509Certificate[] certs;
if (cmd.hasOption("ca")) {
certs = client.getCACerts();
diff --git a/base/java-tools/src/com/netscape/cmstools/client/ClientImportCertCLI.java b/base/java-tools/src/com/netscape/cmstools/client/ClientCertImportCLI.java
index cbd55079a..1ced6727f 100644
--- a/base/java-tools/src/com/netscape/cmstools/client/ClientImportCertCLI.java
+++ b/base/java-tools/src/com/netscape/cmstools/client/ClientCertImportCLI.java
@@ -32,12 +32,12 @@ import com.netscape.cmstools.cli.MainCLI;
/**
* @author Endi S. Dewata
*/
-public class ClientImportCertCLI extends CLI {
+public class ClientCertImportCLI extends CLI {
public ClientCLI clientCLI;
- public ClientImportCertCLI(ClientCLI clientCLI) {
- super("import-cert", "Import certificate into client security database", clientCLI);
+ public ClientCertImportCLI(ClientCLI clientCLI) {
+ super("cert-import", "Import certificate into client security database", clientCLI);
this.clientCLI = clientCLI;
}
@@ -47,8 +47,6 @@ public class ClientImportCertCLI extends CLI {
public void execute(String[] args) throws Exception {
- client = clientCLI.getClient();
-
Option option = new Option(null, "cert", true, "Import certificate file");
option.setArgName("path");
options.addOption(option);
@@ -70,6 +68,8 @@ public class ClientImportCertCLI extends CLI {
System.exit(1);
}
+ client = parent.getClient();
+
byte[] bytes = null;
X509Certificate cert = null;
diff --git a/base/java-tools/src/com/netscape/cmstools/client/ClientRemoveCertCLI.java b/base/java-tools/src/com/netscape/cmstools/client/ClientCertRemoveCLI.java
index be4456115..7549647be 100644
--- a/base/java-tools/src/com/netscape/cmstools/client/ClientRemoveCertCLI.java
+++ b/base/java-tools/src/com/netscape/cmstools/client/ClientCertRemoveCLI.java
@@ -26,12 +26,12 @@ import com.netscape.cmstools.cli.MainCLI;
/**
* @author Endi S. Dewata
*/
-public class ClientRemoveCertCLI extends CLI {
+public class ClientCertRemoveCLI extends CLI {
public ClientCLI clientCLI;
- public ClientRemoveCertCLI(ClientCLI clientCLI) {
- super("remove-cert", "Remove certificate from client security database", clientCLI);
+ public ClientCertRemoveCLI(ClientCLI clientCLI) {
+ super("cert-remove", "Remove certificate from client security database", clientCLI);
this.clientCLI = clientCLI;
}
@@ -58,7 +58,7 @@ public class ClientRemoveCertCLI extends CLI {
System.exit(1);
}
- client = clientCLI.getClient();
+ client = parent.getClient();
String nickname = cmdArgs[0];
client.removeCert(nickname);