diff options
author | Endi S. Dewata <edewata@redhat.com> | 2013-09-25 23:54:39 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2013-10-01 19:26:38 -0400 |
commit | a4a492ef370053764b7dacbbf2f9f36069ea46b2 (patch) | |
tree | 6ba47cbd79602db1f323e232f31cb72f1a31dabc /base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java | |
parent | 7c0fb95b77f0f91c572e0242c09a88605497a455 (diff) | |
download | pki-a4a492ef370053764b7dacbbf2f9f36069ea46b2.tar.gz pki-a4a492ef370053764b7dacbbf2f9f36069ea46b2.tar.xz pki-a4a492ef370053764b7dacbbf2f9f36069ea46b2.zip |
Fixed CLI authentication issue.
Previously the CLI authentication could fail because it's using a
fixed default subsystem which may not match the command it's trying
to execute. The CLI has now been modified to use the appropriate
default subsystem depending on the command to be executed.
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java | 9 |
1 files changed, 8 insertions, 1 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 83cd6851c..c3f43401c 100644 --- a/base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cert/CertCLI.java @@ -68,7 +68,14 @@ public class CertCLI extends CLI { public void execute(String[] args) throws Exception { - certClient = new CertClient(parent.getClient()); + client = parent.getClient(); + + // determine the subsystem + String subsystem = client.getSubsystem(); + if (subsystem == null) subsystem = "ca"; + + // create new cert client + certClient = new CertClient(client, subsystem); super.execute(args); } |