|
6 | 6 |
|
7 | 7 | package org.opensearch.jdbc.test;
|
8 | 8 |
|
| 9 | +import org.eclipse.jetty.server.HttpConnectionFactory; |
| 10 | +import org.eclipse.jetty.server.SslConnectionFactory; |
9 | 11 | import org.opensearch.jdbc.internal.util.UrlParser;
|
10 | 12 | import org.opensearch.jdbc.test.mocks.MockOpenSearch;
|
11 | 13 | import org.eclipse.jetty.server.ConnectionFactory;
|
|
20 | 22 | import org.eclipse.jetty.server.handler.AbstractHandler;
|
21 | 23 | import org.eclipse.jetty.util.ssl.SslContextFactory;
|
22 | 24 |
|
23 |
| -import javax.servlet.ServletException; |
24 |
| -import javax.servlet.http.HttpServletRequest; |
25 |
| -import javax.servlet.http.HttpServletResponse; |
| 25 | +import jakarta.servlet.ServletException; |
| 26 | +import jakarta.servlet.http.HttpServletRequest; |
| 27 | +import jakarta.servlet.http.HttpServletResponse; |
26 | 28 | import java.io.IOException;
|
27 | 29 |
|
28 | 30 | public class TLSServer {
|
@@ -83,17 +85,19 @@ public static Server startSecureServer(
|
83 | 85 | sslContextFactory.setNeedClientAuth(needClientAuth);
|
84 | 86 |
|
85 | 87 | HttpConfiguration httpConfig = new HttpConfiguration();
|
86 |
| - httpConfig.addCustomizer(new SecureRequestCustomizer()); |
| 88 | + SecureRequestCustomizer src = new SecureRequestCustomizer(); |
| 89 | + src.setSniHostCheck(false); |
| 90 | + httpConfig.addCustomizer(src); |
87 | 91 |
|
88 | 92 | httpsConnector = createServerConnector(
|
89 | 93 | jettyServer,
|
90 | 94 | host,
|
91 | 95 | 0,
|
92 |
| - new org.eclipse.jetty.server.SslConnectionFactory( |
| 96 | + new SslConnectionFactory( |
93 | 97 | sslContextFactory,
|
94 | 98 | "http/1.1"
|
95 | 99 | ),
|
96 |
| - new org.eclipse.jetty.server.HttpConnectionFactory(httpConfig) |
| 100 | + new HttpConnectionFactory(httpConfig) |
97 | 101 | );
|
98 | 102 |
|
99 | 103 | jettyServer.addConnector(httpsConnector);
|
|
0 commit comments