From 075f6e638fca3ab3aabb56104a6525b160bbaec5 Mon Sep 17 00:00:00 2001 From: bitterfox Date: Sun, 22 May 2022 12:32:17 +0900 Subject: [PATCH] HBASE-27027 Use jetty SslContextFactory.Server instead of deprecated SslContextFactory (#4425) Signed-off-by: Duo Zhang (cherry picked from commit 1be2c83b3dc8306050f67828c9c2e361f19481c6) --- .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java | 2 +- .../src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java | 2 +- .../main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java index eff88af6b4a..d2437a1e597 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java @@ -417,7 +417,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); diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java index 83da3a191d6..2c4e49e6227 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java @@ -313,7 +313,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); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index 16a83303453..5c70fc2ebc4 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -407,7 +407,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);