protected static Collection findCertificates(X509CertStoreSelector certSelect,List certStores) throws AnnotatedException {
  Set certs=new HashSet();
  Iterator iter=certStores.iterator();
  while (iter.hasNext()) {
    Object obj=iter.next();
    if (obj instanceof X509Store) {
      X509Store certStore=(X509Store)obj;
      try {
        certs.addAll(certStore.getMatches(certSelect));
      }
 catch (      StoreException e) {
        throw new AnnotatedException("Problem while picking certificates from X.509 store.",e);
      }
    }
 else {
      CertStore certStore=(CertStore)obj;
      try {
        certs.addAll(certStore.getCertificates(certSelect));
      }
 catch (      CertStoreException e) {
        throw new AnnotatedException("Problem while picking certificates from certificate store.",e);
      }
    }
  }
  return certs;
}

protected static Collection findCertificates ( X509CertStoreSelector certSelect , List certStores ) throws AnnotatedException { Set certs = new HashSet ( ) ; Iterator iter = certStores . iterator ( ) ; while ( iter . hasNext ( ) ) { Object obj = iter . next ( ) ; if ( obj instanceof X509Store ) { X509Store certStore = ( X509Store ) obj ; try { certs . addAll ( certStore . getMatches ( certSelect ) ) ; } catch ( StoreException e ) { throw new AnnotatedException ( "Problem while picking certificates from X.509 store." , e ) ; } } else { CertStore certStore = ( CertStore ) obj ; try { certs . addAll ( certStore . getCertificates ( certSelect ) ) ; } catch ( CertStoreException e ) { throw new AnnotatedException ( "Problem while picking certificates from certificate store." , e ) ; } } } return certs ; }
return a collection of all certificates or attribute certificates found in the x509store ' s that are matching the certselect criteriums .
