Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/997#discussion_r43632335
--- Diff: core/src/test/java/org/apache/brooklyn/core/test/HttpService.java
---
@@ -128,15 +131,21 @@ public HttpService start() throws Exception {
} finally {
keyStoreStream.close();
}
-
+
+ // manually create like seen in XMLs at
http://www.eclipse.org/jetty/documentation/current/configuring-ssl.html
SslContextFactory sslContextFactory = new
SslContextFactory();
sslContextFactory.setKeyStore(keyStore);
sslContextFactory.setTrustAll(true);
sslContextFactory.setKeyStorePassword("password");
- SslSocketConnector sslSocketConnector = new
SslSocketConnector(sslContextFactory);
- sslSocketConnector.setPort(actualPort);
- server.addConnector(sslSocketConnector);
+ HttpConfiguration sslHttpConfig = new HttpConfiguration();
+ sslHttpConfig.setSecureScheme("https");
+ sslHttpConfig.setSecurePort(actualPort);
+
+ ServerConnector httpsConnector = new
ServerConnector(server, new SslConnectionFactory(sslContextFactory,
"http/1.1"), new HttpConnectionFactory(sslHttpConfig));
--- End diff --
Can use `HttpVersion.HTTP_1_1.asString()` instead.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---