public List<X509Certificate> getCertificates() {
      myReadLock.lock();
      try {
        List<X509Certificate> certificates = new ArrayList<>();
        for (String alias : Collections.list(myKeyStore.aliases())) {
          certificates.add(getCertificate(alias));
        }
        return List.copyOf(certificates);
      }
      catch (Exception e) {
        LOG.error(e);
        return Collections.emptyList();
      }
      finally {
        myReadLock.unlock();
      }
    }
public List<X509Certificate> getCertificates()