HBASE-27027 Use jetty SslContextFactory.Server instead of deprecated SslContextFactory (#4425)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 1be2c83b3d)
This commit is contained in:
bitterfox 2022-05-22 12:32:17 +09:00 committed by Duo Zhang
parent 188dfeec5f
commit b83e03abc2
3 changed files with 3 additions and 3 deletions

View File

@ -418,7 +418,7 @@ public class HttpServer implements FilterContainer {
} else if ("https".equals(scheme)) {
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
httpsConfig.addCustomizer(new SecureRequestCustomizer());
SslContextFactory sslCtxFactory = new SslContextFactory();
SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server();
sslCtxFactory.setNeedClientAuth(needsClientAuth);
sslCtxFactory.setKeyManagerPassword(keyPassword);

View File

@ -314,7 +314,7 @@ public class RESTServer implements Constants {
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
httpsConfig.addCustomizer(new SecureRequestCustomizer());
SslContextFactory sslCtxFactory = new SslContextFactory();
SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server();
String keystore = conf.get(REST_SSL_KEYSTORE_STORE);
String keystoreType = conf.get(REST_SSL_KEYSTORE_TYPE);
String password = HBaseConfiguration.getPassword(conf, REST_SSL_KEYSTORE_PASSWORD, null);

View File

@ -408,7 +408,7 @@ public class ThriftServer extends Configured implements Tool {
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
httpsConfig.addCustomizer(new SecureRequestCustomizer());
SslContextFactory sslCtxFactory = new SslContextFactory();
SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server();
String keystore = conf.get(THRIFT_SSL_KEYSTORE_STORE_KEY);
String password =
HBaseConfiguration.getPassword(conf, THRIFT_SSL_KEYSTORE_PASSWORD_KEY, null);