Open
Description
Hello,
As explained in #1965, a similar functionality is required within the CMSSignedDataStreamGenerator, allowing to provide custom digest algorithm identifiers to the CMS generation class.
This can be achieved by adding the following lines after population of digestAlgos set from signerGens processing:
// add additional digest algorithms
if (digestAlgorithmIDs != null && !digestAlgorithmIDs.isEmpty()) {
digestAlgs.addAll(digestAlgorithmIDs);
}
provided that the following variable and a setter are defined within CMSSignedDataStreamGenerator or its super class CMSSignedGenerator:
private Set<AlgorithmIdentifier> digestAlgorithmIDs;
public void addDigestAlgorithmIDs(Set<AlgorithmIdentifier> digestAlgorithmIDs) {
this.digestAlgorithmIDs = digestAlgorithmIDs;
}
This functionality is required for us for creation of encapsulating CMS signature with a large content, which can be provided only by streaming.
Currently, we need to copy-paste almost all methods of the CMSSignedDataStreamGenerator class due to its many private methods.
Best regards,
Aleksandr