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:
parent
6ae8c9a808
commit
075f6e638f
|
@ -417,7 +417,7 @@ public class HttpServer implements FilterContainer {
|
||||||
} else if ("https".equals(scheme)) {
|
} else if ("https".equals(scheme)) {
|
||||||
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
|
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
|
||||||
httpsConfig.addCustomizer(new SecureRequestCustomizer());
|
httpsConfig.addCustomizer(new SecureRequestCustomizer());
|
||||||
SslContextFactory sslCtxFactory = new SslContextFactory();
|
SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server();
|
||||||
sslCtxFactory.setNeedClientAuth(needsClientAuth);
|
sslCtxFactory.setNeedClientAuth(needsClientAuth);
|
||||||
sslCtxFactory.setKeyManagerPassword(keyPassword);
|
sslCtxFactory.setKeyManagerPassword(keyPassword);
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ public class RESTServer implements Constants {
|
||||||
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
|
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
|
||||||
httpsConfig.addCustomizer(new SecureRequestCustomizer());
|
httpsConfig.addCustomizer(new SecureRequestCustomizer());
|
||||||
|
|
||||||
SslContextFactory sslCtxFactory = new SslContextFactory();
|
SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server();
|
||||||
String keystore = conf.get(REST_SSL_KEYSTORE_STORE);
|
String keystore = conf.get(REST_SSL_KEYSTORE_STORE);
|
||||||
String keystoreType = conf.get(REST_SSL_KEYSTORE_TYPE);
|
String keystoreType = conf.get(REST_SSL_KEYSTORE_TYPE);
|
||||||
String password = HBaseConfiguration.getPassword(conf, REST_SSL_KEYSTORE_PASSWORD, null);
|
String password = HBaseConfiguration.getPassword(conf, REST_SSL_KEYSTORE_PASSWORD, null);
|
||||||
|
|
|
@ -407,7 +407,7 @@ public class ThriftServer extends Configured implements Tool {
|
||||||
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
|
HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig);
|
||||||
httpsConfig.addCustomizer(new SecureRequestCustomizer());
|
httpsConfig.addCustomizer(new SecureRequestCustomizer());
|
||||||
|
|
||||||
SslContextFactory sslCtxFactory = new SslContextFactory();
|
SslContextFactory.Server sslCtxFactory = new SslContextFactory.Server();
|
||||||
String keystore = conf.get(THRIFT_SSL_KEYSTORE_STORE_KEY);
|
String keystore = conf.get(THRIFT_SSL_KEYSTORE_STORE_KEY);
|
||||||
String password =
|
String password =
|
||||||
HBaseConfiguration.getPassword(conf, THRIFT_SSL_KEYSTORE_PASSWORD_KEY, null);
|
HBaseConfiguration.getPassword(conf, THRIFT_SSL_KEYSTORE_PASSWORD_KEY, null);
|
||||||
|
|
Loading…
Reference in New Issue