summaryrefslogtreecommitdiffstats
path: root/base/java-tools
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-02-02 18:03:10 +0100
committerEndi S. Dewata <edewata@redhat.com>2017-02-02 23:11:28 +0100
commit4834425398ba43df6269c8494f011d0282a1d29c (patch)
tree03a8ad21ff1c8ad2462a062fc0073a02be16359e /base/java-tools
parent606ed7ee749d65b6500fcf69930ea4281d76a610 (diff)
downloadpki-4834425398ba43df6269c8494f011d0282a1d29c.tar.gz
pki-4834425398ba43df6269c8494f011d0282a1d29c.tar.xz
pki-4834425398ba43df6269c8494f011d0282a1d29c.zip
Added --renewal param to pki ca-cert-request-submit.
A new parameter has been added to set the renewal field in CertEnrollmentRequest.
Diffstat (limited to 'base/java-tools')
-rw-r--r--base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java b/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java
index acdaebe08..6223a8e66 100644
--- a/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java
+++ b/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java
@@ -56,6 +56,9 @@ public class CertRequestSubmitCLI extends CLI {
option.setArgName("type");
options.addOption(option);
+ option = new Option(null, "renewal", false, "Submit renewal request");
+ options.addOption(option);
+
option = new Option(null, "csr-file", true, "File containing the CSR");
option.setArgName("path");
options.addOption(option);
@@ -154,6 +157,8 @@ public class CertRequestSubmitCLI extends CLI {
}
}
+ request.setRenewal(cmd.hasOption("renewal"));
+
String csrFilename = cmd.getOptionValue("csr-file");
if (csrFilename != null) {
@@ -226,6 +231,10 @@ public class CertRequestSubmitCLI extends CLI {
request.setAttribute("pwd", certRequestPassword);
}
+ if (verbose) {
+ System.out.println(request);
+ }
+
CertRequestInfos cri = certCLI.certClient.enrollRequest(request, aid, adn);
MainCLI.printMessage("Submitted certificate request");
CertCLI.printCertRequestInfos(cri);