public static void createTrustStore(String filename, String password, String alias,
    Certificate cert, String trustStoreType) throws GeneralSecurityException, IOException {
    KeyStore ks = createEmptyKeyStore(trustStoreType);
    ks.setCertificateEntry(alias, cert);
    saveKeyStore(ks, filename, password);
  }
Creates a truststore with a single certificate and saves it to a file.
@param filename       String file to save
@param password       String store password to set on truststore
@param alias          String alias to use for the certificate
@param cert           Certificate to add
@param trustStoreType String keystore file type (e.g. "JKS")
@throws GeneralSecurityException for any error with the security APIs
@throws IOException              if there is an I/O error saving the file
hbase-http/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java