if (signatureType == null) {
signatureType = SignatureType.SHA1_RSA;
}
for (Alias alias : this.parameters.getAliases()) {
PrivateKeyEntry privateKeyEntry = (PrivateKeyEntry) this.parameters.getStore().get(alias, StoreEntryType.PRIVATE_KEY);
if (privateKeyEntry == null) {
throw new SignerException("PrivateKey not found for alias '" + alias.getName() + "'");
}
PrivateKey privateKey = privateKeyEntry.getValue();
Certificate[] chain = privateKeyEntry.getChain();
Certificate certificate = chain[0];
JcaContentSignerBuilder contentSignerBuilder = new JcaContentSignerBuilder(signatureType.getAlgorithm());
if (ConditionUtils.isNotEmpty(this.parameters.getProvider())) {
contentSignerBuilder.setProvider(this.parameters.getProvider());