try {
CMSSignedDataGenerator cmsSignedDataGenerator = new CMSSignedDataGenerator();
TimeStampClient timeStampClient = this.request.getTimeStampClient();
for (Alias alias : this.request.getAliases()) {
StoreEntry certificateEntry = this.request.getStore().get(alias, StoreEntryType.CERTIFICATE);
StoreEntry privateKeyEntry = this.request.getStore().get(alias, StoreEntryType.PRIVATE_KEY);
Certificate certificate = (Certificate) certificateEntry.getValue();
PrivateKey privateKey = (PrivateKey) privateKeyEntry.getValue();
JcaContentSignerBuilder contentSignerBuilder = new JcaContentSignerBuilder(SignatureType.SHA1_RSA.getAlgorithm());
contentSignerBuilder.setProvider(BouncyCastleProviderHelper.PROVIDER_NAME);
ContentSigner contentSigner = contentSignerBuilder.build(privateKey);