// see https://github.com/webmetrics/browsermob-proxy/issues/105
String escapedHost = host.replace('*', '_');
KeyStoreManager keyStoreManager = Utils.getKeyStoreManager(escapedHost);
keyStoreManager.getKeyStore().deleteEntry(KeyStoreManager._caPrivKeyAlias);
keyStoreManager.persist();
listener.setKeystore(new File("seleniumSslSupport" + File.separator + escapedHost + File.separator + "cybervillainsCA.jks").getAbsolutePath());
return keyStoreManager.getCertificateByAlias(escapedHost);
} catch (Exception e) {
throw new RuntimeException(e);