org.bouncycastle.cms.SignerInformationVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcmail Show documentation
Show all versions of bcmail Show documentation
A patched bouncycastle-mail
The newest version!
package org.bouncycastle.cms;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifier;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculator;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
public class SignerInformationVerifier
{
private ContentVerifierProvider verifierProvider;
private DigestCalculatorProvider digestProvider;
public SignerInformationVerifier(ContentVerifierProvider verifierProvider, DigestCalculatorProvider digestProvider)
{
this.verifierProvider = verifierProvider;
this.digestProvider = digestProvider;
}
public boolean hasAssociatedCertificate()
{
return verifierProvider.hasAssociatedCertificate();
}
public X509CertificateHolder getAssociatedCertificate()
{
return verifierProvider.getAssociatedCertificate();
}
public ContentVerifier getContentVerifier(AlgorithmIdentifier algorithmIdentifier)
throws OperatorCreationException
{
return verifierProvider.get(algorithmIdentifier);
}
public DigestCalculator getDigestCalculator(AlgorithmIdentifier algorithmIdentifier)
throws OperatorCreationException
{
return digestProvider.get(algorithmIdentifier);
}
}