diff options
| author | Abhishek Koneru <akoneru@redhat.com> | 2013-10-30 08:28:19 -0400 |
|---|---|---|
| committer | Abhishek Koneru <akoneru@redhat.com> | 2013-10-31 15:34:03 -0400 |
| commit | aa52cb632be5f64c8859ac636937f0c526b1f10d (patch) | |
| tree | a294eff20318bf2eeab557d93deef391363740bb /base/java-tools | |
| parent | a42e510e5b916d5d8dbdc9b9a59cf80c90c197cd (diff) | |
| download | pki-aa52cb632be5f64c8859ac636937f0c526b1f10d.tar.gz pki-aa52cb632be5f64c8859ac636937f0c526b1f10d.tar.xz pki-aa52cb632be5f64c8859ac636937f0c526b1f10d.zip | |
Modify output file option for cert-request-review command.
Change the --output option to --file for providing a file to store the
certificate request to be reviewed using the cert-request-review cli command.
Update the man page entry for the same.
Ticket #674
Diffstat (limited to 'base/java-tools')
| -rw-r--r-- | base/java-tools/man/man1/pki.1 | 56 | ||||
| -rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java | 6 |
2 files changed, 18 insertions, 44 deletions
diff --git a/base/java-tools/man/man1/pki.1 b/base/java-tools/man/man1/pki.1 index ec0af7c3d..c70315178 100644 --- a/base/java-tools/man/man1/pki.1 +++ b/base/java-tools/man/man1/pki.1 @@ -124,53 +124,27 @@ To release a certificate that has been placed on hold: .B pki <agent authentication> cert-release-hold <certificate ID> .SS Certificate Requests -To request a certificate, first generate a certificate request in PKCS #10 or CRMF, and store this request in an XML file. For example: - -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -.br -<CertEnrollmentRequest> - <profileId>caUserCert</profileId> - <isRenewal>false</isRenewal> - <Input> - <InputAttrs> - <InputAttr name="cert_request_type">crmf</InputAttr> - <InputAttr name="cert_request">MIIBozCCAZ8wggEFA ... - CSR in Base 64 ... </InputAttr> - </InputAttrs> - <inputId>KeyGenInput</inputId> - </Input> - <Input> - <InputAttrs> - <InputAttr name="sn_uid">testuser</InputAttr> - <InputAttr name="sn_e">testuser@example.com</InputAttr> - <InputAttr name="sn_c">US</InputAttr> - <InputAttr name="sn_ou">Engineering</InputAttr> - <InputAttr name="sn_cn">Test User</InputAttr> - <InputAttr name="sn_o">Example</InputAttr> - </InputAttrs> - <inputId>SubjectNameInput</inputId> - </Input> - <Input> - <InputAttrs> - <InputAttr name="requestor_name">admin</InputAttr> - <InputAttr name="requestor_email">admin@example.com - </InputAttr> - <InputAttr name="requestor_phone">123-456-7890</InputAttr> - </InputAttrs> - <inputId>SubmitterInfoInput</inputId> - </Input> -.br -</CertEnrollmentRequest> - -Then submit the request for review. This can be done without authentication. +To request a certificate, first generate a certificate request in PKCS #10 or CRMF, and store this request in the XML template file, of the profile type the request relates to. + +The list of profiles can be viewed using the CLI command: + +.B pki ca-cert-request-profile-find + +The XML template file for a profile type can be created by calling the ca-cert-request-profile-show CLI command. For example: + +\fBpki ca-cert-request-profile-show <profileID> --output <file to store the XML template>\fP , + +will store the XML template of the request in the specified output file. + +Then, fill in the values in the XML file and submit the request for review. This can be done without authentication. .B pki cert-request-submit <request file> Then, an agent needs to review the request by running the following command: -.B pki <agent authentication> cert-request-review <request ID> --output <request review file> +.B pki <agent authentication> cert-request-review <request ID> --file <file to store the certificate request> -The request, as well as the defaults and constraints of the enrollment profile, will be stored in the output file. The agent can examine the file and override any values if necessary. To process the request, enter the appropriate action when prompted: +The certificate request, as well as the defaults and constraints of the enrollment profile, will be stored in the output file provided by the --file option. The agent can examine the file and override any values if necessary. To process the request, enter the appropriate action when prompted: .B Action (approve/reject/cancel/update/validate/assign/unassign): diff --git a/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java b/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java index d303b2edb..d39a70389 100644 --- a/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cert/CertRequestReviewCLI.java @@ -47,7 +47,7 @@ public class CertRequestReviewCLI extends CLI { option.setArgName("action"); options.addOption(option); - option = new Option(null, "output", true, "Output filename"); + option = new Option(null, "file", true, "File to store the certificate request"); option.setArgName("filename"); options.addOption(option); @@ -78,8 +78,8 @@ public class CertRequestReviewCLI extends CLI { String filename = null; if (action == null) { - if (cmd.hasOption("output")) { - filename = cmd.getOptionValue("output"); + if (cmd.hasOption("file")) { + filename = cmd.getOptionValue("file"); } else { System.err.println("Error: Missing output file name."); printHelp(); |
