// Which digest algorithm to use to create the response, if applicable
ret.setPreferredDigestAlg(req.getPreferredDigestAlg());
// Include the CA cert or not in the response, if applicable for the response type
ret.setIncludeCACert(req.includeCACert());
ret.setStatus(ResponseStatus.PENDING);
ret.create();
return ret;
}
private byte[] createPKCS7(Certificate[] chain, PrivateKey pk, X509Certificate cert) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException, CertStoreException, CMSException, IOException {
Collection<Certificate> certList = Arrays.asList(chain);