Hi.
I've downloaded and using the latest version (1.47) of the BouncyCastle API.
In this version the SignerInformation class only has one verify method that takes a SignerInformationVerifier object. This class is not mentioned in the book. I've tried to figure out how to use it the best. As it is right now I've made my own method that looks like this.
private SignerInformationVerifier createSIV(X509CertificateHolder x509ch) throws Exception {
BcRSAContentVerifierProviderBuilder qaz = new BcRSAContentVerifierProviderBuilder((DigestAlgorit hmIdentifierFinder) new DefaultDigestAlgorithmIdentifierFinder()); CMSSignatureAlgorithmNameGenerator sang = new DefaultCMSSignatureAlgorithmNameGenerator(); SignatureAlgorithmIdentifierFinder saif = new DefaultSignatureAlgorithmIdentifierFinder();
DigestCalculatorProvider dcp = new BcDigestCalculatorProvider();
SignerInformationVerifier siv = new SignerInformationVerifier(sang, saif, qaz.build(x509ch), dcp);
return siv;
}
I've a hard time thinking this is how it's supposed to be.
Could you please explain how to use/create the SignerInformationVerifier class and an example.
Regards
Patric