no such provider: BC - find CertStore whitout provider ?
843810Dec 21 2004 — edited Apr 11 2005Hello,
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.