[Pki-users] CertClient.enrollRequest not returning a certId

David Kinghorn david at datasages.com
Thu Jul 28 21:06:25 UTC 2016


Hey guys, using pki 10.2.5.6 with the java client, I am able to enroll a
cert request, but I do not get a cert id or any other meaningful
information back. The result.getEntries() collection is empty. Does anyone
know what I need to do to have it return the cert id? This is based on the
example here:
https://git.fedorahosted.org/cgit/pki.git/tree/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java
The
code is below: CertEnrollmentRequest enrollmentRequest =
client.getEnrollmentTemplate(config.getRemoteAssetCertProfileId()); for
(ProfileInput input : enrollmentRequest.getInputs()) { ProfileAttribute
typeAttribute = input.getAttribute("cert_request_type"); if (typeAttribute
!= null) { typeAttribute.setValue("pkcs10"); } ProfileAttribute
requestAttribute = input.getAttribute("cert_request"); if (requestAttribute
!= null) { requestAttribute.setValue(certData); } } CertRequestInfos result
= client.enrollRequest(enrollmentRequest);

System.out.println("Entry count: " + result.getEntries().size());
I get an entry count of 0.

Thanks,
~ David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pki-users/attachments/20160728/8c69cea0/attachment.htm>


More information about the Pki-users mailing list