CertStore certs = CertStore.getInstance("Collection", new CollectionCertStoreParameters(certList), "BC");
gen1.addCertificatesAndCRLs(certs);
gen1.addSigner(keys.getPrivate(), cert, digestOid,
new AttributeTable(attributes), null);
// The signed data to be enveloped
CMSSignedData s = gen1.generate(signThis, true, "BC");
return s;
}
private byte[] wrap(byte[] envBytes, String messageType, String transactionId) throws IOException, NoSuchAlgorithmException, NoSuchProviderException, CMSException, InvalidAlgorithmParameterException, CertStoreException {
//