if(KeyStoreManager.getInstance(KeyStoreManager.DEFAULT_KEY_STORE).isKeyStoreEmpty()) {
throw new Exception("The keystore does not contain any certificates. Please run the installation wizard (--install).");
}
KeyStore ks = KeyStoreManager.getInstance(KeyStoreManager.DEFAULT_KEY_STORE).getKeyStore();
String pw = ContextHolder.getContext().getConfig().retrieveProperty(new ContextKey("webServer.keystore.sslCertificate.password"));
KeyManager[] kma = new KeyManager[] { new CustomKeyManager(pw) };
TrustManager[] tma = null;
if(trustManager == null) {
TrustManagerFactory tm = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tm.init(ks);
tma = tm.getTrustManagers();