code: @Override
      Collection<X509Certificate> getMatchingCerts
          (State currState, List<CertStore> certStores)
          throws CertStoreException, CertificateException, IOException
      {
          ReverseState currentState = (ReverseState) currState;
  
          if (debug != null)
              debug.println("In ReverseBuilder.getMatchingCerts.");
  
          /*
           * The last certificate could be an EE or a CA certificate
           * (we may be building a partial certification path or
           * establishing trust in a CA).
           *
           * Try the EE certs before the CA certs. It will be more
           * common to build a path to an end entity.
           */
          Collection<X509Certificate> certs =
              getMatchingEECerts(currentState, certStores);
          certs.addAll(getMatchingCACerts(currentState, certStores));
  
          return certs;
      }
docs: Retrieves all certs from the specified CertStores that satisfy the
  requirements specified in the parameters and the current
  PKIX state (name constraints, policy constraints, etc).
  
  @param currentState the current state.
  Must be an instance of <code>ReverseState</code>
  @param certStores list of CertStores