public static int appendUserTrustStore(@NotNull String path, char[] password) {
    try {
      KeyStore tmpStore = loadKeyStore(path, password);
      if (tmpStore == null) return 0;
      int cnt = 0;
      for (Enumeration<String> aliases = tmpStore.aliases(); aliases.hasMoreElements(); ) {
        String alias = aliases.nextElement();
        Certificate certificate = tmpStore.getCertificate(alias);
        if (certificate == null) continue;
        ourAdded.add(Pair.create(alias, certificate));
        ++cnt;
      }
      return cnt;
    }
    catch (Exception e) {
      throw new IllegalStateException(e);
    }
  }
public static int appendUserTrustStore(@NotNull String path, char[] password)