Issue #3464 - Split SslContextFactory into Client and Server

Fixed a couple of places where Server was used instead of Client.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-04-03 19:24:14 +02:00
parent c4b2621f56
commit a18c2c49f9
2 changed files with 13 additions and 8 deletions

View File

@ -48,7 +48,8 @@ public class TLSServerConnectionCloseTest
private void startClient() throws Exception
{
SslContextFactory sslContextFactory = new SslContextFactory.Server();
SslContextFactory sslContextFactory = new SslContextFactory.Client();
sslContextFactory.setEndpointIdentificationAlgorithm(null);
sslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
sslContextFactory.setKeyStorePassword("storepwd");

View File

@ -55,12 +55,10 @@ public class TryFilesFilterTest
connector = new ServerConnector(server);
server.addConnector(connector);
SslContextFactory sslContextFactory = new SslContextFactory.Server();
sslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
sslContextFactory.setKeyStorePassword("storepwd");
sslContextFactory.setTrustStorePath("src/test/resources/truststore.jks");
sslContextFactory.setTrustStorePassword("storepwd");
sslConnector = new ServerConnector(server, sslContextFactory);
SslContextFactory.Server serverSslContextFactory = new SslContextFactory.Server();
serverSslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
serverSslContextFactory.setKeyStorePassword("storepwd");
sslConnector = new ServerConnector(server, serverSslContextFactory);
server.addConnector(sslConnector);
ServletContextHandler context = new ServletContextHandler(server, "/");
@ -71,7 +69,13 @@ public class TryFilesFilterTest
context.addServlet(new ServletHolder(servlet), "/*");
client = new HttpClient(sslContextFactory);
SslContextFactory.Client clientSslContextFactory = new SslContextFactory.Client();
clientSslContextFactory.setEndpointIdentificationAlgorithm(null);
clientSslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
clientSslContextFactory.setKeyStorePassword("storepwd");
clientSslContextFactory.setTrustStorePath("src/test/resources/truststore.jks");
clientSslContextFactory.setTrustStorePassword("storepwd");
client = new HttpClient(clientSslContextFactory);
server.addBean(client);
server.start();