code: @Override
      public Collection<Certificate> engineGetCertificates
              (CertSelector selector) throws CertStoreException {
          if (coll == null) {
              throw new CertStoreException("Collection is null");
          }
          // Tolerate a few ConcurrentModificationExceptions
          for (int c = 0; c < 10; c++) {
              try {
                  HashSet<Certificate> result = new HashSet<>();
                  if (selector != null) {
                      for (Object o : coll) {
                          if ((o instanceof Certificate) &&
                              selector.match((Certificate) o))
                              result.add((Certificate)o);
                      }
                  } else {
                      for (Object o : coll) {
                          if (o instanceof Certificate)
                              result.add((Certificate)o);
                      }
                  }
                  return(result);
              } catch (ConcurrentModificationException e) { }
          }
          throw new ConcurrentModificationException("Too many "
              + "ConcurrentModificationExceptions");
      }
docs: Returns a <code>Collection</code> of <code>Certificate</code>s that
  match the specified selector. If no <code>Certificate</code>s
  match the selector, an empty <code>Collection</code> will be returned.
  
  @param selector a <code>CertSelector</code> used to select which
  <code>Certificate</code>s should be returned. Specify <code>null</code>
  to return all <code>Certificate</code>s.
  @return a <code>Collection</code> of <code>Certificate</code>s that
  match the specified selector
  @throws CertStoreException if an exception occurs