<div dir="ltr"><span style="color:rgb(51,51,51);font-family:monospace;font-size:11.375px;line-height:19.6px;white-space:pre-wrap">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.</span><font color="#333333" face="monospace"><span style="font-size:11.375px;line-height:19.6px;white-space:pre-wrap">
Does anyone know what I need to do to have it return the cert id?
This is based on the example here: <a href="https://git.fedorahosted.org/cgit/pki.git/tree/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java">https://git.fedorahosted.org/cgit/pki.git/tree/base/java-tools/src/com/netscape/cmstools/cert/CertRequestSubmitCLI.java</a>
</span>
<span style="font-size:11.375px;line-height:19.6px;white-space:pre-wrap">
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);</span></font>
<br><br><span style="color:rgb(51,51,51);font-family:monospace;font-size:11.375px;line-height:19.6px;white-space:pre-wrap"> System.out.println("Entry count: " + result.getEntries().size());
</span><br>I get an entry count of 0.<br><br>Thanks,<br>~ David<br><br></div>