if (signerIt.hasNext()) {
SignerInformation signer = (SignerInformation) signerIt.next();
Iterator<?> certIt = certs.getCertificates(
(new JcaX509CertSelectorConverter()).getCertSelector(signer.getSID())).iterator();
if (certIt.hasNext()) {
// the signer certificate
X509Certificate cert = (X509Certificate) certIt.next();