public static void loadKey(@NotNull String alias,
                             @NotNull String clientKeyPath,
                             @Nullable String clientCertPath,
                             @Nullable char[] password) {
    try {
      Pair<PrivateKey, List<X509Certificate>> keyAndCerts = SslUtil.readPrivateKeyAndCertificate(clientKeyPath, password);
      List<X509Certificate> certificates = clientCertPath == null ? keyAndCerts.second : SslUtil.loadCertificates(clientCertPath);
      ourAdded.add(new KeyEntry(alias, keyAndCerts.first, certificates == null ? null : certificates.toArray(new Certificate[0])));
    }
    catch (Exception e) {
      throw new IllegalStateException(e);
    }
  }
public static void loadKey(@NotNull String alias,
                             @NotNull String clientKeyPath,
                             @Nullable String clientCertPath,
                             @Nullable char[] password)