public static int appendUserKeyStore(@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();
        Key key = tmpStore.getKey(alias, null);
        if (key == null) continue;
        Certificate[] certChain = tmpStore.getCertificateChain(alias);
        ourAdded.add(new KeyEntry(alias, key, certChain));
        ++cnt;
      }
      return cnt;
    }
    catch (Exception e) {
      throw new IllegalStateException(e);
    }
  }
public static int appendUserKeyStore(@NotNull String path, char[] password)