diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2013-10-03 18:07:05 -0400 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2013-10-08 10:07:19 -0400 |
| commit | 26f0ac03af26836c417dec5a9321e944289a7fa8 (patch) | |
| tree | 236c6f9acff84c803e649ebbb1935ae2a4f0462e /base/java-tools | |
| parent | f9a4be1cf5b57afec59b0b96a46ff13317a039bf (diff) | |
| download | pki-26f0ac03af26836c417dec5a9321e944289a7fa8.tar.gz pki-26f0ac03af26836c417dec5a9321e944289a7fa8.tar.xz pki-26f0ac03af26836c417dec5a9321e944289a7fa8.zip | |
Added CA certificate CLI.
The ca-cert-* commands have been added to eventually replace cert-*.
The CATest has been updated to use the CertClient directly.
Diffstat (limited to 'base/java-tools')
| -rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java | 14 | ||||
| -rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cli/CACLI.java | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java b/base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java index c3f43401c..30a808b06 100644 --- a/base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java @@ -69,13 +69,17 @@ public class CertCLI extends CLI { public void execute(String[] args) throws Exception { client = parent.getClient(); + certClient = (CertClient)parent.getClient("cert"); - // determine the subsystem - String subsystem = client.getSubsystem(); - if (subsystem == null) subsystem = "ca"; + // if this is a top-level command + if (certClient == null) { + // determine the subsystem + String subsystem = client.getSubsystem(); + if (subsystem == null) subsystem = "ca"; - // create new cert client - certClient = new CertClient(client, subsystem); + // create new cert client + certClient = new CertClient(client, subsystem); + } super.execute(args); } diff --git a/base/java-tools/src/com/netscape/cmstools/cli/CACLI.java b/base/java-tools/src/com/netscape/cmstools/cli/CACLI.java index fdef872fb..00fbb9807 100644 --- a/base/java-tools/src/com/netscape/cmstools/cli/CACLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cli/CACLI.java @@ -20,6 +20,7 @@ package com.netscape.cmstools.cli; import com.netscape.certsrv.ca.CAClient; import com.netscape.certsrv.client.Client; +import com.netscape.cmstools.cert.CertCLI; import com.netscape.cmstools.group.GroupCLI; import com.netscape.cmstools.selftests.SelfTestCLI; import com.netscape.cmstools.user.UserCLI; @@ -34,6 +35,7 @@ public class CACLI extends SubsystemCLI { public CACLI(CLI parent) { super("ca", "CA management commands", parent); + addModule(new CertCLI(this)); addModule(new GroupCLI(this)); addModule(new SelfTestCLI(this)); addModule(new UserCLI(this)); |
