private static AssertionResult verifySignature(SMIMEAssertionTestElement testElement, SMIMESignedParser s, String name)
throws CMSException {
AssertionResult res = new AssertionResult(name);
try {
CertStore certs = s.getCertificatesAndCRLs("Collection", "BC"); // $NON-NLS-1$ // $NON-NLS-2$
SignerInformationStore signers = s.getSignerInfos();
Iterator<?> signerIt = signers.getSigners().iterator();
if (signerIt.hasNext()) {
SignerInformation signer = (SignerInformation) signerIt.next();
Iterator<?> certIt = certs.getCertificates(signer.getSID()).iterator();
if (certIt.hasNext()) {
// the signer certificate
X509Certificate cert = (X509Certificate) certIt.next();