Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

no such provider: BC - find CertStore whitout provider ?

843810Dec 21 2004 — edited Apr 11 2005
Hello,

I want to use this example from Bouncy Castle API to verify signed data in CMS format. :

#CMSSignedData signature = new CMSSignedData(buffer);
#SignerInformation signer = (SignerInformation)signature .getSignerInfos().getSigners().iterator().next();
#CertStore cs = signature .getCertificatesAndCRLs("Collection", "BC");
#Iterator iter = cs.getCertificates(signer.getSID()).iterator();
#X509Certificate certificate = (X509Certificate) iter.next();
#CMSProcessable sc = signature.getSignedContent();
#byte[] data = (byte[]) sc.getContent();

But I dont understand what means the String "Collection" and "BC" in this line :
#CertStore cs = signature .getCertificatesAndCRLs("Collection", "BC");

I ve got this error on my signed data when i run the program :
"java.security.NoSuchProviderException: no such provider: BC"

The provider from certificates in my signed data is certainly not "BC" ( Bouncy Castle), how can I obtain the CertStore without know the provider ?

Thank you for your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2005
Added on Dec 21 2004
4 comments
6,318 views