public static void cleanupSSLConfig(Configuration conf) throws Exception {
    File f = new File(conf.get(FileBasedKeyStoresFactory.resolvePropertyName(SSLFactory.Mode.SERVER,
      FileBasedKeyStoresFactory.SSL_TRUSTSTORE_LOCATION_TPL_KEY)));
    f.delete();
    f = new File(conf.get(FileBasedKeyStoresFactory.resolvePropertyName(SSLFactory.Mode.SERVER,
      FileBasedKeyStoresFactory.SSL_KEYSTORE_LOCATION_TPL_KEY)));
    f.delete();

    String clientKeyStore =
      conf.get(FileBasedKeyStoresFactory.resolvePropertyName(SSLFactory.Mode.CLIENT,
        FileBasedKeyStoresFactory.SSL_KEYSTORE_LOCATION_TPL_KEY));
    if (clientKeyStore != null) {
      f = new File(clientKeyStore);
      f.delete();
    }
    f = new File(KeyStoreTestUtil.getClasspathDir(KeyStoreTestUtil.class) + "/"
      + conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
    f.delete();
    f = new File(KeyStoreTestUtil.getClasspathDir(KeyStoreTestUtil.class) + "/"
      + conf.get(SSLFactory.SSL_SERVER_CONF_KEY));
    f.delete();
  }
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