diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2013-04-26 13:47:30 -0400 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2013-04-28 01:06:37 -0400 |
commit | bc03ee6c31e5390e76d2f92d00931d19a71eea7b (patch) | |
tree | c90bbc8ebb474ed2eb1e0f7f3a4d55f4bd843c09 /base/java-tools/src/com/netscape/cmstools/cli | |
parent | 4dbd2579662d3ba7d31cbedda96293de71b06844 (diff) | |
download | pki-bc03ee6c31e5390e76d2f92d00931d19a71eea7b.tar.gz pki-bc03ee6c31e5390e76d2f92d00931d19a71eea7b.tar.xz pki-bc03ee6c31e5390e76d2f92d00931d19a71eea7b.zip |
Ignoring warnings/errors during installation.
The code used by pkispawn and pkidestroy has been modified to ignore
certificate validity warnings/errors that happens during installation.
The instanceCreationMode is now redundant and has been removed from
ClientConfig.
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/cli')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java b/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java index d5707d155..9b011f0d8 100644 --- a/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java @@ -54,8 +54,8 @@ public class MainCLI extends CLI { public ClientConfig config = new ClientConfig(); - public Collection<Integer> rejectedCertStatuses; - public Collection<Integer> ignoredCertStatuses; + public Collection<Integer> rejectedCertStatuses = new HashSet<Integer>(); + public Collection<Integer> ignoredCertStatuses = new HashSet<Integer>(); public File certDatabase; @@ -201,17 +201,15 @@ public class MainCLI extends CLI { config.setPassword(password); String list = cmd.getOptionValue("reject-cert-status"); - rejectedCertStatuses = convertCertStatusList(list); + convertCertStatusList(list, rejectedCertStatuses); list = cmd.getOptionValue("ignore-cert-status"); - ignoredCertStatuses = convertCertStatusList(list); + convertCertStatusList(list, ignoredCertStatuses); } - public Collection<Integer> convertCertStatusList(String list) throws Exception { + public void convertCertStatusList(String list, Collection<Integer> statuses) throws Exception { - if (list == null) return null; - - Collection<Integer> statuses = new HashSet<Integer>(); + if (list == null) return; Class<SSLCertificateApprovalCallback.ValidityStatus> clazz = SSLCertificateApprovalCallback.ValidityStatus.class; @@ -224,8 +222,6 @@ public class MainCLI extends CLI { throw new Error("Invalid cert status \"" + status + "\".", e); } } - - return statuses; } public void connect() throws Exception { |