code: public X509CertificateHolder getCertificate(Selector selector)
      {
          try {
              return (X509CertificateHolder) this.store.getMatches(selector).iterator().next();
          } catch (Throwable t) {
              return null;
          }
      }
docs: Get the first certificate matching the provided selector.
  
  @param selector the selector.
  @return a certificate holder.