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

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
bitterfox 2022-05-22 12:32:17 +09:00 committed by GitHub
parent 2b573ae377
commit 1be2c83b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -311,7 +311,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);