keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword");
if (keyStorePassword == null) {
throw new IllegalArgumentException("keyStorePassword or system property javax.net.ssl.keyStorePassword must be set");
}
}
SslSocketConnector sslConnector = new SslSocketConnector();
sslConnector.setSslKeyManagerFactoryAlgorithm(ssl.getKeyManagerFactoryAlgorithm());
sslConnector.setSslTrustManagerFactoryAlgorithm(ssl.getTrustManagerFactoryAlgorithm());
sslConnector.setProtocol(ssl.getProtocol());
sslConnector.setConfidentialPort(url.getPort());
sslConnector.setPassword(ssl.getKeyStorePassword());
sslConnector.setKeyPassword(ssl.getKeyPassword() != null ? ssl.getKeyPassword() : keyStorePassword);
sslConnector.setKeystore(keyStore);
sslConnector.setKeystoreType(ssl.getKeyStoreType());
sslConnector.setNeedClientAuth(ssl.isNeedClientAuth());
sslConnector.setWantClientAuth(ssl.isWantClientAuth());
connector = sslConnector;
} else {
String connectorClassName = configuration.getJettyConnectorClassName();
try {
connector = (Connector) Class.forName(connectorClassName).newInstance();